Hi,I am using worklow model 10.0.0.1, TS 6.7.1 SP1.I have created a workflow model and initiating after selecting a DCR.I need to validate if the user has not attached more than one DCR and if the selected DCR is not already attached with a workflow. To do these validations I am planning to use preprocess JAVA command.I have 2 questions:How do I get if the selected DCR is not already in some other workflow in the JAVA class using modeler workflow APIHow do i end the job if the user has selected more than one DCR or the DCR is already in some different workflow after showing a error message to the user.This needs to be done in preprocess JAVA class.Following is the sample of what I have created to check if user has selected more than one DCR but I am not sure how to end the workflow if the count is more than 1.public class PangeaWorkflowModel implements InProcessJavaCommand { public WFMWorkflow execute(WFMWorkflow workflow, Map params){// Add a file to the workflowWFMTask[] tasks=workflow.getTasks();WFMFile [] wfmFiles = workflow.getFiles(); for (int i = 0; i < wfmFiles.length; i++){if(wfmFiles.length > 1){System.out.println("More Than One files are attached.");System.exit(1);} }// Add a file to the workflowWFMFile file=new WFMFile("/default/main/baseline/Region/WORKAREA/working/templatedata/hotel/hotel_information/data/UK/ALGHI/Test.dcr","Comment Sample");try {workflow.addFile(file);} catch (WFMException e) {// TODO Auto-generated catch blocke.printStackTrace();}return workflow;} }
Hi,This information is present in workflow model user guide 1.0.0.1Can anyone in this group please help me with the queries I have. I am sure someone must have used workflow model and figured out how it can provide at least some basic checks.Before a job is created i want to verify two things:1. If a user has selected more than one DCR (can be checked using preprocess JAVA class)2. If the selected DCR is already in someother workflow.(can be checked by calling a perl script from JAVA class)But after verifying these how do I show an error to the user that there is something wrong and stop the job being created.These are every basic validations but even after trying hard I could not figure out a way to show any message to the user.I request the techies in the group to please throw some light.
Thanks a bunch for the reply....Second thing is call server is asynchronous call and it does not return any value so how do I know if the validation was successful. Becuase it is asyn call how do i make sure process halts till call server finishes the job.