This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

APPLICATION - PRODUCT ENGINEERING - Workflow

walekarsa - Friday, October 9, 2009 2:50 AM:

Hi Friends,

I have created an Item type which has a specific workflow and a lifecyle. The item type is versionable. I am able to send this item through the workflow. However after release when a new version is created a new workflow does not get trigerred.

There are two places where a workflow for the item type needs to be mentioned. On in the ITEM TYPE workflow tab and another one in the create LIFECYCLE dialogue box. however if I enter the workflow in both these places it solves the above problem but gives rise to another problem of 2 same activities correponding to 2 same workflow processes in the Inbasket of the identity.

 

Kindly help me in regards, 



tstickel - Monday, October 12, 2009 1:48 PM:

Are you only seeing the duplicate Activity/Assignments when you create a new item, but when an existing item is versioned do you not get the duplicates?

If so, then I would try removing the workflow from the Item Type definition and only have it on the Lifecycle definition.  That way the workflow should only be triggered once, no matter whether the item is being created via Insert or via a new Version.



walekarsa - Thursday, October 15, 2009 1:09 AM:

Hi Terry,

I even tried the solution told by you. When I remove the workflow from the item definition I get an error ' Failed to set item state for the item'.

I am not allowed to create the item unless the workflow is mentioned in the item type definition.

Is this a bug or the program is expected to behave in this way. My Release code is 9.0.1.

With Regards,



tstickel - Friday, October 16, 2009 11:26 AM:

Have you tried keeping the workflow on the item definition, but uncheck the "default" box?  That way the workflow will not automatically start when the item is created.  But, you should be able to reference the workflow in the life-cycle definitions.

I don't believe that this problem is a bug.



walekarsa - Tuesday, October 20, 2009 5:45 AM:

Hi Terry ,

Thanks a lot for your solution. It worked. For my benfit can you please elaborate on the significance of checking the default box.What if there is no Workflow mentioned in the Lifecycle definition and we have unchecked the Item type 'workflow's default checkbox.



tstickel - Tuesday, October 20, 2009 10:10 AM:

The workflow tab on Itemtype definitions is used to list the workflows that are valid for an Itemtype.  If there is an attempt to start a workflow for an Itemtype, but the workflow is not included in the list, the workflow will fail with an error saying that the workflow is invalid for the Itemtype.  You can associate multiple workflows with an Itemtype, but only those that are marked "Default" will be automatically started when an instance of the Itemtype is created.

If you associate a workflow with an Itemtype, but do not mark it as "Default", then it will not be automatically started when the Itemtype instance is created.  Instead the non-default workflows can be started by explict coding in a method (see the startWorkflow item method) or as you have already seen by specifying the workflow in a life-cycle State definition for the Itemtype.

So what happens if you mark a workflow as "Default" and include the same workflow in the life-cycle definition's Start state?  One instance of the workflow will be triggered by the creation of an Itemtype instance and a second instance of the same workflow will also be created because the Itemtype instance has entered the Start state.

Now what happens if there is no Workflow mentioned in the Lifecycle definition and we have unchecked the Item type 'workflow's default checkbox?  Then the workflow will have to be explicitly started via the Itemtype startWorkflow method.

Hope that this helps