How to pause/resume workflow from an Autoactivity?

AjoshGS
edited November 27, 2014 in Documentum #1

Hi,

Is it possible to pause a workflow while in an AutoActivity via DFC and then resume it based on user requirement.


1. Workflow is started. (Performers are selected dynamically at runtime)
2. AutoActivity one is triggered
3. Need to check if Manual Acivity One Peformer is allocated
  a- If present proceed to manual activity
  b- If not present pause the workflow till user allocates the user
4. Once user allocates the performer then workflow should be resumed

If user decides not to go ahead with the workflow then he should be able to terminate it.

I need to achieve this using DFC. I am using CS 6.5 Sp1 & Workflow manager

Psuedo for Autoactivty Method

Check if performer are present

If yes

{

     acquire the workitem.

     complete the activity

     proceed to next activity

     complete the worktiem

}

else

{

     pause the workflow

}

My question here is what will be the right way to resume the workflow. How will i make sure that the autoactivity will start again successfully.

Comments

  • DCTM_Guru
    edited August 17, 2009 #2
    I believe workflow supervisor or a user with sysadmin privileges can resume a paused workflow activity.  They might have to be trained to paused activity and resume it.  If you are using BPM, you can also define an exception activity that sends the activity to a user when the workflow pauses.
  • AjoshGS
    edited August 29, 2009 #3

    Hello Johnny,

    Thank you for your response.

    Sorry for the delay in responding. I will put up my requirement a bit more clearer with an example. First of all am not using BPM. Am using Worklfow Manager. My request to pause a workflow happend due to some parameter which are missing. And the requesting Application is a J2EE application. Documentum APIs are been used to achieve documentum related functionality.

    Let me give you an example here. Let us assume the Workflow template in the following manner

    START   ------->  AutoActivity  ------->  ManualActivity -------> END

                                                                        |                               A

                                                                        L--------------------------I

    Taking the above drawn representation as a sample

    Following is the conitions & flow.

    1. User pushes a document into the above workflow

    2. The Document reached AutoActivity.

         a) Using DFC i need to check if the custom attribute for the document is having some values in it (Before acquiring the workitem)

         b) If Yes then go ahead to push the package to ManualActivity

         c) If No then pause the workflow & wait till the custom attribute value is updated

    3) Once the Custom Attribute is populated. I need to resume the workflow check again if the values are right

         a) If the values are correct then proceed with the workflow

         b) If the values are in-correct then keep the workflow in paused mode

    Basically i need to know that if a Workflow is paused while in AutoActivity (Before Acquiring the Workitem) is it possible then every time i resume the workflow the respective autoactivity is restarted. (Please do excuse my language used to explain the scenario in short)

    Thanks,

    Ajosh

  • DCTM_Guru
    edited August 29, 2009 #4
    I would actually approach the problem in a different manner.  I would remove the auto-activity and make it a server method/job to query on documents that "the custom attribute for the document is having some values in it."  If this is true, then start the modified workflow.  This way you dont have to worry about the idea of pausing/resuming activity.
  • DeepakEMC
    edited November 24, 2014 #5

    Dear Johnny,

    I have a requirement where user is asking to create a dash board where he can see all the passed activity (both auto and manual) and he also want a rerun option to rerun the paused activity.

    My Approach:-

    1     if i am correct we can get all paused activity details by below 

    >> select *(workflowid,performer,r_act_seqno ect) from dmi_workitem where r_runtime_state ='3';

    2    Display all the item in a DataGrid with a Button.

    3    On button click get the workflow id and execute a dql to rerun the task.

    Any suggestion how to rerun using dql or please suggest me a best way to do this.

  • dnvhariprasad
    edited November 27, 2014 #6

    use DFC to rerun/force the task to complete