It's all about the answers!

Ask a question

Do I need to programmatically update the Process Configuration?


Andrew Soloninka (5511924) | asked Jul 19 '13, 4:05 p.m.
 I have a process that among other things creates two Promotion Definitions via an asynchronous task. The first promotion is from Integration to development(reverse promotion). The second promotion is from development to integration. The Promote Work Item(server) operation has the precondition Require Work Item State which prevents a promotion from occurring unless the workflow is at a particular state. This means that these states must be set in the Process Configuration before the Asynchronous Task ends. One solution would be to programmatically update the Process Configuration. However, I have found in the forum that this is not recommended or supported as of 10/2012. What other solutions could be applied? 

Comments
Ralph Schoon commented Jul 22 '13, 4:25 a.m. | edited Jul 31 '13, 12:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I fail to understand your problem/question. What do you try to achieve or where do you have an issue? Why would you want to update the process configuration?

3 answers



permanent link
Geoffrey Clemm (30.0k23035) | answered Jul 22 '13, 5:19 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I understand what you are requesting ... you want to set the appropriate Require_Work_Item_State preconditions when you are automatically creating your Promotion Definitions.   My understanding is that the primary problem with updating the Process Definition programatically is controlling when those changes "take effect".   So if you can run your script, and then restart the RTC server, I will speculate that would be OK.   But note that I'm only speculating here ... could someone from the RTC process team comment on whether there is any validity to my speculation?

permanent link
Thomas Yu (45183) | answered Jul 30 '13, 9:34 p.m.
Hi Andrew,
I don't know  how Promote work items work, but I am wondering why you want to update the work item state by updating the process configuration since the Promote Work Item precondition there is specially to control whether the promotion can happen
If I understand correctly, only work items are in the specified state that you can do the promotion, it looks to me more like a work item state check than work flow state update? If the work item meets the precondition, then you do the promotion, else just skip it?

Comments
Thomas Yu commented Jul 30 '13, 9:36 p.m.

work item state check than work flow state update--- I mean precondition check than precondition update in the process configuration.


Geoffrey Clemm commented Jul 31 '13, 12:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

He didn't want to update the work item state ... he wants to programatically add the appropriate Require_Work_Item_State precondition to the process configuration.


permanent link
Thomas Yu (45183) | answered Jul 31 '13, 2:43 a.m.
Geoffrey Clemm:
The precondition for the server side operation will take effect immediately when it is configured.

Andrew:
As far as I can tell, there is no API to programatically configure the precondition for the operation. One possible way(internal use) is:
1. Read out the process configuration specification source from the project area
2. Update the specification source with the necessary change for the Promote Work Item Operation.
3. Save the updated process configuration specification source back to the project area
4. Save Project Area

Comments
Geoffrey Clemm commented Aug 01 '13, 6:19 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The precondition takes effect immediately when it is configured through the project area editor GUI.   For context on my earlier comment, a customer I was working with wanted to update the process configuration in a follow-up action, and the change made throught the follow-up action did not appear to take effect until the RTC server was restarted.  It might be that they were just not calling the right RTC API's, or it might be these calls just don't work properly in the context of a follow-up action.  At the time, the advice from the process team was just "don't try to update the process configuration in a follow-up action" (:-).  So we ended up using a different approach.

Your answer


Register or to post your answer.