Try OpenEdge Now
skip to main content
BP Server Developer's Guide
Process template management : Creating process templates
 

Creating process templates

After a ProcessTemplate is created, it is not available until it is activated. BP Server provides a single API to create and activate a ProcessTemplate. However, you need not activate the ProcessTemplate when you create it. You can activate it later when required.
*public ProcessTemplate createProcessTemplate(Session session, String xml, boolean activate)
At the time of creation, you can avoid activating the ProcessTemplate by setting the Boolean parameter activate to "false". Later, when required, the ProcessTemplate can be activated by invoking the activate() API.
As an example, consider the following parameters:
*String xml = "Hiring.xml";
*boolean activate = true; // activates the process template at creation time
*ProcessTemplate pt = blServer.createProcessTemplate(session, xml, activate);
This API creates a ProcessTemplate for the Hiring application, and activate it.
Note: If you try to create a ProcessTemplate which is already created, then BP Server throws an exception.
*public void activate()
If a ProcessTemplate is created, but not activated, then you can activate it by invoking this API.
Note: If you try to activate a ProcessTemplate which is already activated, then BP Server throws an exception.
An important point to note is that while an activated process template can be suspended, a suspended process template cannot be activated. A suspended process template can only be resumed. If you try to activate a suspended process template, then BP Server throws an exception.