-1

I have business requirement to update bundle title in workflow started activities.

Steps to replicate the issue:

  1. Open CME
  2. Create a Bundle and add items (Component/Page)
  3. Start Workflow process
  4. Click Left side "activities" navigation
  5. Click "started activities"
  6. open created Bundle and rename title
  7. Save and close

Looking for suggestion and idea for this requirement.

enter image description here

3
  • 1
    I have read your question several times and it is not clear to me what you exactly are asking, From the title it appears you are asking about a workflow process, but then you mention steps to reproduce an issue? I suggest you edit your question and make it clear. Commented Nov 3, 2017 at 11:35
  • Do you mean that you want to rename the Workflow Process Instance (called “Task Name” in the above list) when the Bundle is renamed? Commented Nov 3, 2017 at 11:35
  • I think, his question is clear from the title. He wants to update the title of a bundle (which is in workflow) during the execution of a Manual Activity. I agree it's little confusing in question description, I guess by "Steps to replicate the issue" he means "What I want to do". Looks like he is having issues in Step 6. Commented Nov 3, 2017 at 11:48

2 Answers 2

2

Thanks for your response. I Implemented logic for this business requirement and validated below code and working fine for me.

internal void OnSaveEventInitiated(Bundle bundle, SaveEventArgs args)
{
    using (BundleImplementor bundleImplementor = new BundleImplementor())
    {               
        bundleImplementor.UpdateBundleTitle(bundle, args);
    }
}

public void UpdateBundleTitle(Bundle bundle, SaveEventArgs args)
{
    if (!args.IsNewItem)
    {
        if (bundle.IsEditable && bundle.CurrentActivity!=null )
        {
            ProcessInstance processInstance = new ProcessInstance(bundle.CurrentActivity.Process.Id, bundle.Session);
            processInstance.Title = bundle.Title;
            processInstance.Save(); 
        }
    }
}
2
  • 1
    So, you wanted to rename the Process Instance when a Bundle which is in workflow is renamed. Can you update your Question to make this clear? Note that you are currently updating the Process Instance for every change to the Bundle (incl. adding/removing items). This has negative impact on performance. Commented Nov 3, 2017 at 18:41
  • 1
    This should also work: ProcessInstance processInstance = (ProcessInstance) bundle.CurrentActivity.Process. Or this: Process processInstance = bundle.CurrentActivity.Process. Commented Nov 3, 2017 at 18:48
1

If you open the Workflow Manual Activity Properties, you will find "Constraints" listed as checkbox. (Refer to the image at the bottom)

These options are to constrain what the user can and cannot do while performing the Workflow Activity.

  • Deny items to be added/removed: Prohibits the user from adding or removing items in the Process.

  • Deny Subject(s) to be edited: Prohibits the user from editing content items associated with the Activity.

  • Deny Bundle metadata to be edited: Prohibits the user from editing the metadata of a Bundle associated with the Activity.

Please check the Constraints for your Activity in Visio Workflow Definition. I think, you need to uncheck one of the two (Deny Subject(s) to be edited OR Deny Bundle metadata to be edited) and save the Workflow Process Definition in Tridion.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.