Former_Member
8 years agoAccelerator III
Workflow Map and dependent relationship
I am trying to validate the proof-of-concept for a parser designed for automated integration of process models. I would like to use a server-side method in C#.
Creating new workflow maps works so far. Unfortunately, I already fail in a basic functionality. I want to set an activity template as a child relation to a workflow map. Here is my previous code:
Innovator inn = this.getInnovator(); Item workflow = inn.getItemById("Workflow Map","AAE3732B971C4397917669FC46576DC8"); string id = getNewID(); // Create new instance of Relationship ItemType Item newWMA = inn.newItem("Workflow Map Activity","add"); newWMA.setProperty("source_id", "AAE3732B971C4397917669FC46576DC8"); Item relatedItem = newItem("Activity Template","add"); newWMA.setRelatedItem(relatedItem); workflow.addRelationship(newWMA); relatedItem.apply(); return this;Unfortunately the execution always results in the following error code:
Dependent Activity Template cannot be create: source item not found.The ItemType Activity Template is set to "dependent". I assume that the error is related to this. Many thanks for the help in advance. Greetings Rik
Where is defined on which Activity Template a path points to? In my opinion it would be logical that this is referenced via the "related_id"-Property of the Workflow Map Path instance (Item Type). In a query, however, this value is always null. Also the Related Item Type of the Workflow Map Path is not defined.
I hope I can explain my problem properly. Many thanks and greetings
Rik
For the documentation. The following method (C#) works and returns the correct relation