Hi,

I want to create a workflow programmatically using Taverna 2.3 API.
I tried following code but I am not able to create a workflow.

Code:
                                                Edits editsImpl = new 
EditsImpl();
                                                ActivityInputPort 
activityInputPort = editsImpl.createActivityInputPort("command", 1, true, null, 
String.class);
                                                Processor processor = 
editsImpl.createProcessor("localworkerCommandLine");
                                                ProcessorInputPort 
processorInputPort = editsImpl.createProcessorInputPort(processor, "comd", 0);
                                                ProcessorOutputPort 
processorOutputPort = editsImpl.createProcessorOutputPort(processor, "result", 
1, 0);
                                                OutputPort outputPort  = 
editsImpl.createActivityOutputPort("Log", 1, 0);
                                                CommandLineInvocationContext 
commandLineInvocationContext = new CommandLineInvocationContext(null, null);

                                                Datalink datalink = 
editsImpl.createDatalink(null, processorInputPort);
                                                Dataflow dataflow = 
editsImpl.createDataflow();

                                                
System.out.println(dataflow.toString());
                                                DataflowValidationReport 
dataflowValidationReportImpl = dataflow.checkValidity();
                                                System.out.println("Validity 
chk"+dataflowValidationReportImpl.isValid());
                                                System.out.println("Validity 
chk"+dataflowValidationReportImpl.isWorkflowIncomplete());
                                                System.out.println("Validity 
chk"+dataflowValidationReportImpl.getFailedEntities());
                                                // Add the processor to the 
dataflow
                                                
editsImpl.getAddProcessorEdit(dataflow, processor).doEdit();
                                                // Create a workflow output 
port and a workflow input port
                                                
editsImpl.getAddDataflowInputPortEdit(dataflow,
                                                
editsImpl.createDataflowInputPort("Input", 0, 0, dataflow))
                                                                .doEdit();
                                                
editsImpl.getAddDataflowOutputPortEdit(dataflow,
                                                
editsImpl.createDataflowOutputPort("Output", dataflow)).doEdit();

I am not able to connect the workflow input to the processor and the processor 
to the workflow output.
Please give me inputs.

Thank you.

Regards,
Prashant Bandal


DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
taverna-users mailing list
[email protected]
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/

Reply via email to