Java Process Starter
Java Process Starter is a process starter activity. You can use this activity to create a custom starter written in Java.
General
Java Process Starter Abstract Class
The JavaProcessStarter abstract class defines the interface of your Java Process Starter with the TIBCO ActiveMatrix BusinessWorks™ application. You must define an implementation for the following methods:
- init() : this method is called when the process engine starts up. This method should initialize any resource connections. You could also specify a Java global instance on the Advanced tab that initializes resource connections. Java global instances are also loaded and initialized during application start up. You can call this .getJavaGlobalInstance() to obtain the Java global instance resource in your process starter code.
- onStart() : this method is called by the process engine to activate the process starter. This method should activate any event notifier or resource observer code. The notifier or observer code can then call the onEvent() method to start a process instance.
- onStop(): this method is called by the application to deactivate the process starter. This method should deactivate any event notifier or resource observer code.
- onShutdown(): this method is called by the application when the AppNode shuts down. This method should release any resources and resource connections and perform any required clean up operations.
- onEvent(Object object): this method is called when a listener or resource observer catches a new event. The input to this method is a Java object containing the event data.
- getGlobalInstance(): this method returns an object reference to the Java global resource specified on the Advanced tab of the process starter. This is useful if you want to place initialization code or other shared information in a Java global resource instead of in the init() method of this class.
- onError(): this method throws the exception specified in the input parameter. Use this method to propagate an error to the ActiveMatrix BusinessWorks™ process instance when a listener or resource observer fails to generate an event.
Passing Java Objects Between Java Activities
You can create instances of Java objects in Java Invoke activity or by using the Java Invoke or XML To Java activities. These Java objects can be passed using an output parameter to another activity later in the process definition. The Java Invoke activity receiving a Java object accepts the object into an input parameter. Map the output Java object to the input object of the receiving Java Invoke object.
The General tab has the following fields.
Advanced
The Advanced tab has the following fields.
Field | Literal Value/Module Property | Description |
---|---|---|
Sequence key | None | This field can contain an XPath expression that specifies which processes should run in sequence. Process instances with sequencing keys that evaluate to the same value are executed in the sequence the process instance was created. |
Custom Job Id | None | This field can contain an XPath expression that specifies a custom job ID for the process instance. |
Java Global Instance | Yes | A Java global instance resource. Specify a value in this field to reference a Java global instance resource in your JavaProcessStarter implementation class.
For more information, see Java Global Instance. You can use the getGlobalInstance() method to obtain a reference to the Java global instance resource. |
Conversations
You can initiate the conversation here. Click the Add New Conversation button to initiate multiple conversations.
For more information about conversations, see TIBCO ActiveMatrix BusinessWorks™ Application Development guide.