This discussion is archived
9 Replies Latest reply: Sep 21, 2013 8:16 AM by user12213849 RSS

Modify existing workflow

user12213849 Newbie
Currently Being Moderated

We need to modify existing workflow in UCM but only known approach - disable step and enable it. Is any alternative way to change it UCM workflow code?

  • 1. Re: Modify existing workflow
    Anand U Journeyer
    Currently Being Moderated

    Hi,

     

    What exactly are you trying to modify in your workflow. How are you achieving it by disabling and enabling workflow.

     

    - Anand

  • 2. Re: Modify existing workflow
    jiri.machotka Guru
    Currently Being Moderated

    The only thing you can modify in an enabled workflow is the idocScript code in workflow events - well, aliases (user groups) and possibly also tokens, that both define approvers might be modified too.

     

    If you need anything else, don't use native workflows, but expose BPM Suite or BPEL workflows, which have such capabilities as running two or more versions of the same workflow. Note that UCM license contains restricted use of BPEL PM, and WebCenter Content license contains restricted use of the whole Unified BPM Suite.

  • 3. Re: Modify existing workflow
    user12213849 Newbie
    Currently Being Moderated

    Hi,

    I need to modify idocscript in Update event for some workflow step. Th effect of this change will be if I disable and enable the workflow step after that.

     

    Leonid

  • 4. Re: Modify existing workflow
    user12213849 Newbie
    Currently Being Moderated

    Yes, I need to modify idocScript in workflow event - but to see effect of that , I need to disable and enable back, otherwise the change will not take a place. Is any other way around - without disable or enable workflow step? I am not sure we have BMP Suite.

     

    Thank you,

    Leonid

  • 5. Re: Modify existing workflow
    William Phelps Expert
    Currently Being Moderated

    While directly writing IDOC script in the applet window is perfectly acceptable, you will experience some need to change it, thus your dilemma of having to disable the workflow in order to edit it.

     

    It is a much better practice to put your IDOC logic in a component within a dynamichtml include, and simply reference the include in the applet.

     

    For example, let's say your workflow is named "MyWorkflow" and you have a step called "Step1".  To create code in the entry step, in a custom component create a dynamichtml include called "my_workflow_step_1_entry"

     

    <@dynamichtml my_workflow_step_1_entry@>

    do something

    <@end@>

     

    Then in the workflow applet for "MyWorkflow" --> "Step1" entry event, simply put the following code

    <$include my_workflow_step_1_entry$>

     

    Now you can edit the code in the component resource file rather than the applet, and certainly don't have to enable/disable the workflow.

     

    The one caveat here is that changes to the resource file code will require a server restart in order for the changes to take effect, as workflow code is cached differently as I recall.  There is another way to get around that limitation, but I'll leave that solution for a blog post.

  • 6. Re: Modify existing workflow
    user12213849 Newbie
    Currently Being Moderated

    Thank you. We have the code in production already and our users found the bug so we have to fix existing workflow in production, We do not use component, just calling workflow from ADF code. There is no problem to restart the server but the issue with disable/enable code - the workflow will lose the content.

  • 7. Re: Modify existing workflow
    Anand U Journeyer
    Currently Being Moderated

    Hi,

     

    If you have idoc scrips in your entry event for example, you have an option to edit the exit event of the step and you need NOT disable and enable your workflow. The change gets reflected. I tried the following and it works:

    - Created a 1 step WF

    - In my entry event I am assigning a value to the dDocTitle metadata

    - Created a content and made it fall in this step

    - Now I edited my exit event to assign a different value to the dDocTitle metadata

    - Approved the content

    - The new value is assigned to dDocTitle field

     

    See if this can fit in your case.

     

    Regards,

    - Anand

  • 8. Re: Modify existing workflow
    user12213849 Newbie
    Currently Being Moderated

    Hi,

     

    Did you modify Basic or Manual Workflow or Criteria Workflow? We need to modify Criteria Workflow. Also, if you modified Criteria one, did you try to modify update event - this is where I need to make changes?

    Thank you,

    Leonid

  • 9. Re: Modify existing workflow
    user12213849 Newbie
    Currently Being Moderated

    Hello,

    I found this information in Oracle documentation

    Managing Workflows - 11g Release 1 (11.1.1)

    If a workflow must be disabled to modify it (for example, to add a step) all revisions are immediately released from the workflow (Criteria workflow) or deleted (Basic workflow). To disable a workflow without releasing content:

    1. Clone the workflow to a static workflow which has the same step sequence as the original workflow but which has no step logic. The content goes into a step and stays there until moved.
    2. Create an update event in the original workflow. This event is triggered by time and pushes the content into the cloned static workflow at the appropriate step.
    3. When the content is out of the original workflow, disable the workflow, make the necessary changes, then re-enable it. Then use the same timed event logic to move the content from the cloned workflow back to the original workflow.

    Does anybody know how to clone the workflow?

     

    Thank you,

    Leonid

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points