Workflows

Workflows are used in Windchill to model business processes that combine manual and automatic tasks. The automatic tasks come from a set off predefined actions such as "set state" or can be custom that is essentially java code that is executed dynamically, sometimes these are called workflow robots. The workflow is created in a UI that allows an administrator to create a networks of task

Workflow Template

image-20231120145355161

The java runs in the Windchill JVM making it possible to call an extension with the wex invoke

Arguments the are useful to pass are

Example

com.wincomplm.wex.kernel.api.invoke.WexInvoker.invoke("[groupud].[artifactid]","robots.[name]", self);
@WexComponent(uid = "robots", description = "My Workflow Robots")
public class ExampleRobots {

    static IWexLogger logger = WexLogger.getLogger(ExampleRobots.class);

    @WexMethod(name = "myrobot", description = "Executes some example code
    public static String myRobot(WfProcess self) throws Exception {
        return "something";
    }
}