Connection of 2 different workflows

Dear Community,

I have a question regarding the connection of 2 different workflows. I built a workflow of 'Parts' and another one for 'Documents'. 'Parts' and 'Documents' are two different ItemTypes and are connectd through a relationship 'One Part can have many Documents'.

The Workflow of 'Parts' can be defined as follow:

The Workflow of Documents is represented as follow:

Now, what I was trying to achieve is that once the activity 'Revision' is carried out in the 'Parts' workflow the 'Document' workflow should be opened and tasks sent to my InBasket. This is because, I want my employees to check if my documents related to a part need to be reviewed and revised once the latter has been revised. I know that I could extend the Parts workflow, however, I want to avoid that. 

I tried assigning the Document Workflow as a Subflow of the Parts 'Revision' activity and implementing the promotion with the Relationship Parts-Document as the ItemType. I added the Document Lifecycle and Workflow in the Relationship ItemType and in the Document ItemType. However, nothing seemed to work.  (PS: the two workflows work fine independently)

How should I proceed?

I would be very thankful for any help.

Best regards,

Florian

Parents
  • I think you would need a Method on the Parts workflow that searched for any attached Documents and activated the workflow on them.

  • オフライン in reply to Meismart

    wouldn't it be possible to put the relationship 'Parts-document' as the itemtype in Promotions?

  • I think you are getting confused by the ItemType on the workflow (as I did once).

    The ItemType used during a workflow promotion is the ItemType of the Item being voted on, defining the document at this stage:
       WILL NOT automatically promote the Document relationships. 
       WILL allow you to re-use the Workflow on the Document ItemType.

    i.e. if you had a simple Lifecycle and workflow, you could re-use these multiple times by defining a separate promotion for each ItemType you planned to use it on.

    In order to affect the relationship items, you need a method that uses the context item to find the related items and perform a promotion.

    I.e. use AML to get the Document Items based on the Part-Document relationship, then call the Action "Promote" on each Document in turn.

    Many thanks,
    Martin.

Reply
  • I think you are getting confused by the ItemType on the workflow (as I did once).

    The ItemType used during a workflow promotion is the ItemType of the Item being voted on, defining the document at this stage:
       WILL NOT automatically promote the Document relationships. 
       WILL allow you to re-use the Workflow on the Document ItemType.

    i.e. if you had a simple Lifecycle and workflow, you could re-use these multiple times by defining a separate promotion for each ItemType you planned to use it on.

    In order to affect the relationship items, you need a method that uses the context item to find the related items and perform a promotion.

    I.e. use AML to get the Document Items based on the Part-Document relationship, then call the Action "Promote" on each Document in turn.

    Many thanks,
    Martin.

Children
  • オフライン in reply to Meismart

    Hello Martin,

    Thank you very much for your quick reply and solution! I'll get into the AML code then in order to get the document items through the relationship.

    Best regards,

    Florian

  • オフライン in reply to Meismart

    Hello again Martin,

    I tried coding the method as you said. I wrote it for the relationship Parts-Document. Basically if I do a revision of my part i want to promote my document back to 'In work' in order to trigger the workflow.

    I wrote following method:

    I assigned it in the RelationshipType Parts_Document and selected 'OnSelectRow'.

    However, I get following error message every time I click on the document in my Parts form:

    Do you have any idea where that comes from?

    Kind regards,

    Florian