Can someone suggest is there a way to trigger existing workflow by "workflowname" using cssdk java api.
Thanks,
Vasanthi P
Have you looked at the javadocs for the CSSDK? Specifically for CSWorkflowEngine? The answer is there...
Are you trying to initiate a WFM or a WFT?
If you're trying to do it through CSSDK - as Smitty indicated, you should look at the JavaDocs - you essentially need to create a jobspec from the WFT or WFM first, otherwise you need to use CLTs.
For WFTs, the CLTs will allow you to provide command-line parameters (in the form of an input XML file) to take the place of instantiation form variable input.
In the case of WFM you are much more limited and have to work around the fact that iwmodelc doesn't provide for command line parameters to take the place of instantiaton form variables (note: this was presented to one of the product managers during HP Engage 2015, and I believe they will be looking into it, though there's no ETA for it at this time). You may need to redesign the WFM to collect information within a CGI Task early on (start-task?) and write the code for the CGI so that it can take input from someplace other than a browser input form).
Alternatively, in either case (WFT | WFM) you can create a job spec from the workflow specification, perform some pre-processing on the XML and then utilize CSSDK to instantiate the job. Not pretty, but it works.
Hi Vasanthi,
In "workflowModeler.jar", there is a class named "Instantiator" under package "com.interwoven.modeler.clt".
You can create a copy of this class and use it. You can change the code as per your need like the expanded Job Spec. file name etc. From your custom code call the method "instantiateModel" with option "-i" along with other parameters which will instantiate the workflow by workflow name.
Note: Register the command "new_job" for the workflow in available_models.xml file.
Hope this answers your question.