Task/Template Instantiation Workflow Block
10 min
the task/template instantiation workflow block creates a task or template instance task/template instantiation workflow block properties exit ports exit port description ok continue to the next block failed general exit port for a failed integration action a logical next step is to trigger a notification properties property description title a unique name for the workflow block select task/template source object the source task or template object select from the drop down list select task/template source record the source task or template record object select from the drop down list select task/template source relationship the source task or template relationship object select from the drop down list select target object the target object select from the drop down list actions button action save commits your settings cancel exits without saving example the following is a working example for frequent traveler setup you have two objects fulfillmentitempackage fulfillmentitem a package is a template; when used, it creates a fulfillmentitem fulfillment items are built from fulfillmentitem packages in the packages, the task catalog tab lists tasks created by the task/template block for that fulfillmentitem therefore, "tasks are built from task catalogs " to clarify the process "frequent traveler setup" allows selection of fulfillment items from a list of packages the workflow (wf) iterates over this list, adding fulfillmentitem objects to the service request when a fulfillmentitem is added, its wf triggers the task/template block this block iterates over the task catalog items in the fulfillmentitempackage to create tasks and attach them to the fulfillmentitem (not directly to the service request) this explanation helps manage the complexity of multiple items and the importance of the insert multi child block for entering values into fulfillment items you have a list of fulfillment items this list is validated against fulfillment the multi block iterates over this list when inserting items on the insert multi child define the relationship for adding new entries specify the field or parameter to iterate over, such as the list control called 'items' expressions pull data from each selected 'item' to create fulfillmentitems, using 'borecid' as the recid for the current entry the multi child block is processing $(getbovalue(recid, "borecid", "fulfillmentitempackage#", "name")) this is why you select the 'select child object type' relationship above; it is tied to fulfillmentitem the first "insert multi child" workflow simply adds the fulfillment items a standard workflow in fulfillmentitem then adds the tasks from the catalog in the fulfillmentitem object, a workflow triggers whenever a new fulfillment item is created this workflow uses task/template instantiation when the first workflow creates the fulfillment item, this triggers the creation of tasks on the fulfillment item based on the template on the initial insert multi child block, define the relationships for the template the templatelink relationship between fulfillmentitempackage and taskcatalog creates tasks based on the catalog items linked to the package in the fulfillment item templatelink category fulfillmentitempackage the base business object being evaluated templatelink $(getbovalue(recid, "borecid", "fulfillmentitempackage#", "recid")) pulls the recid of the fulfillment package currently processed in the insert multi child iteration templatelink relationship fulfillmentitempackageassoctaskcatalog the relationship from fulfillmentitempackage to taskcatalog the block iterates over items in this relationship specific to the package recid and inserts tasks using the 'target', causing multiple tasks to be added target the location where the task will be created example here is a fulfillment item package with two task catalog items each time this package is used, two tasks are created following is the submission snapshot following is the outcome snapshot the two expected tasks are created
