Method for calling external programs in Shark

zhaozj2021-02-16  107

I recently read the workflow engine Sharon, I feel that scalability and configurability are very good.

step:

1,

Define processes, mainly Relevant Date and Applications, etc.

2,

Write the Class file called, see

3,

Run Shark, load testAppinvoke.xpdl, add Application maping, select Applications to TestApp, which is the application defined in the package; toolagent type is javaclasstooLagent; Application Name column Fill in the Class name

4,

Start the process in the Process Instantiation Management, the application is automatically performed

Precautions:

1. The data used in the application can be defined as Workflow Relevant Date; incoming type can be used for IN, OUT or INOUT; increases Extended Attribute, named variabletoprocess_update or variabletoprocess_ /update or variableToProcess_View, value is parameter name;

2, the program needs to be in the classpath, the program name used is full name, including the packet path (without .class);

3, the compiled class file is placed under the Repository / StoredProcedures path, pay attention to the path of the package;

4, there are three types of active nodes to call external programs

l

The active node is "Tool" type, the executor is "system", start and end mode as "automatic";

l

The active node is "Tool" type, no executor, start and end mode is "automatic";

l

The active node is "Tool" type, the executor is the type other than "system", the start mode is manual, the end mode is Automatic

5,

If the program mapping is not defined in Shark, Shark will call the default TOOLAGENT, which can be defined in Shark.conf;

6,

RuntimeApplicationToolAgent can perform other external programs, such as NotePad, etc. At this time, if the incoming application mode is 0, Shark will wait for the execution of the application; if not 0, Shark will continue the process after the application begins. ;

7.

JavaScriptToolagent can be used to perform JavaScript, Application Mode is 0, and the system will search for files, execution;

TestAppinvoke.java

转载请注明原文地址:https://www.9cbs.com/read-10723.html

New Post(0)