Warning

JUser: :_load: Unable to load user with ID: 1005

Ron
Ron
Offline
0
How to use subtasks that join back to the parent workflow in two different places? For example: A parent workflow (p1) spawns two subtask workflows (s1, s2). P1 needs to wait for S1 to finish before transitioning to the next state. Further in the P1 workflow it needs to wait for S2. There doesn't seem to be a way for the parent to diffentiate between s1 and s2.

The problem can be more complicated when you have multiple subtasks that need to be in sync. Say, instead of s1 I have s1a, s1b and s1c. All must be completed, but not s2, before the parent can transition to the next state.

In the past, I wrote AppScript to handle these situations, but I am hoping there is a better, built-in way to handle them.
Responses (4)
  • Accepted Answer

    Thursday, March 15 2012, 03:56 AM - #Permalink
    0
    What about using actions and/or triggers to automate when P1 moves?
    The reply is currently minimized Show
  • Accepted Answer

    Ron
    Ron
    Offline
    Thursday, March 15 2012, 04:14 AM - #Permalink
    0
    Hi Mike,

    Thanks for the quick reply.

    Using actions is really the problem. Maybe a diagram will help:



    Parent

    --- --- --- --- ---

    |1| --- |2| --- |3| --- |4| --- |5| ---

    --- --- --- --- ---

    \ / /

    Subtask 1a --/ /

    Subtask 1b -/ /

    Subtask 2 ----------------/



    At state 1 parent spawns 3 subtasks. At state 3 it waits for s1a & s1b to complete before moving to state 4. It them must wait at state 5 for s2 to complete.

    Using actions we can 'wait for none/all/most to be complete' but I don't know of a way to say wait for only s1a and s1b.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 15 2012, 04:29 AM - #Permalink
    0
    What about using Triggers instead - a little more controls?

    Also

    To accomplish this perhaps you need to set some hidden fields as each sub-task progresses that you can then use in either you action logic or triggers.

    Or perhaps add an action only state in the sub-task workflow that each sub-task moves as it progresses. I understand your problem but it's difficult coming up with a solution without seeing it in composer, etc.

    We have relational fields for parent and children setup in our workflows and this helps to make sure we only action those items that are related. We also have some hidden fields that we set by default on specific actions that are then used to trigger an action on either parent or sub-tasks or sometimes both.

    You might also consider that sub-task 2 become a child of s1a or s1b, etc becoming a grandchild to the parent.

    It sounds like you are using State Actions, you have more control with transition actions, perhaps you can do more with child transition actions rather than parent state actions.

    It would also help to know what version of SBM or TT you are running as SBM has a lot more functionality than TT especially in actions.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 15 2012, 05:24 AM - #Permalink
    0
    I would not make Subtask 2 a "subtask", but just use a relational field. Then you can use subtask movement at state 3 and trigger movement at state 5.
    The reply is currently minimized Show
Your Reply

Recent Tweets