How to use Beanshell in OSWORKFLOW

xiaoxiao2021-03-06  51

1) Defined Process Files: This defines a name to Example, Location Process file in /samples/comment-arg.xml

2) Establish the code of the main method in the test class com.hongsoft.test: counter = 0; // To test the variable map inputs = new hashmap (); Inputs.put ("test", this); / / key: "Test" Value: This class is the object long id = Workflow.initialize ("Example", 1, INPUTS); // Put Map into Assertequals ("Beanshell Script Not Parsed Correctly", 2, Counter; / /judgment

3) The initial actions defined by the process is as follows: com.hongsoft.os.test test = transientvars.get ("test"); test.counter ; test.counter ; When calling the workflow.initialize () method, Will call the scripts in Beanshell

Finally, Test.counter changed from 0 for 2.

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

New Post(0)