Starting an interruptible process using the EJB interface

Steps for this task

  1. (Optional)   List the process templates to find the name of the interruptible process you want to start.
    This step is optional if you already know the name of the process.
    ProcessTemplateData[] processTemplates = process.queryProcessTemplates
    ("PROCESS_TEMPLATE.CAN_RUN_INTERRUP=TRUE"
     "PROCESS_TEMPLATE.NAME",
     newInteger(50),
     null); 
    The results are sorted by name. The query returns an array containing the first 50 sorted templates that can be started as interruptible processes.
  2. Start the process with an input message of the appropriate type.
    If you specify a process-instance name, it must not start with an underscore. If a process-instance name is not specified, the process instance ID (PIID) in String format is used as the name.
    Customer input = new Customer("Smith");
    PIID piid = process.initiate("CustomerTemplate", "CustomerOrder", 
                                  new ClientObjectWrapper(input));
    
    This action creates an instance, CustomerOrder, of the process template, CustomerTemplate, and passes some customer data. When the process starts, the operation returns the object ID of the new process instance to the caller.

    The starter of the process instance is set to the caller of the request and receives a work item for the process instance. The process administrators, readers, and editors of the process instance are determined and receive work items for the process instance. The starting activity instances are determined and either started automatically or, if they are person activities or receive events, work items are created for the potential owners.


Related concepts
Queries on business-process objects in V5.0-style processes



Searchable topic ID:   t6macste
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/wfapi/tasks/t6macste.html

Library | Support | Terms of Use | Feedback