|

|
|
|
Simple Workflow Example
This scenario replicates the previous Simple
Messaging case, but using a Workflow.
(1) Create the Directories and Ports. To do this, please follow the steps
outlined for the Simple Messaging Scenario.
(2) Remove the Port Routing entry, if one has been created. Edit Port FilesIn, and go to the Routing tab. Select the routing entry to FilesOut, and click
Delete. We will use a simple Workflow to route the Message instead.
(3) Create a Workflow. To do this, right click on the 'Workflows' node in
the SmartsIntegrator Explorer tree, and select 'New Workflow'. Enter a name
of 'Passthrough Workflow' when prompted. The Workflow editor will appear.
Note that this may take up to a minute the first time, as the Visual Studio for
Applications templates will be initialised.

(4) Create the Activities. For our Workflow we just require two activities
- a ReceivePortActivity and a SendPortActivity.
This is so we can receive the Message, and then send it out again.
Drag them, in this order, from the activity palette on the right into the main workflow
area on the left. Your Workflow should look like this :

(5) Define a Message. We require a Message variable to hold the Message being
received and sent whilst it is being processed. To create this, click on the
'Messages and Variables' tab of the top-right pane. Then click the item labeled
'Click to create a new Message'. Enter a Message name of 'Message1'. Having defined a Message or Variable here, it is available
for use across the Workflow (and also from VSTA code as a member variable).
Note that normally you would associate a schema with the Message, enabling enhanced
support for design-time typing of the XML structure in Visual Studio for Applications,
but we won't do this for this example.

(6) Assign the Message variable to the ReceivePortActivity. Now we need to
tell the ReceivePortActivity to store the message it receives in this variable.
To do this, select the ReceivePortActivity, and click in the cell labeled Message
in the Properties pane (to the lower right of the window). A dropdown should
appear - select Message1 from this dropdown.

(7) Assign the Message variable to the SendPortActivity. We also need to tell
the SendPortActivity to pick up the message to be sent from this variable.
To do this, select the SendPortActivity, and click in the cell labeled Message in
the Properties pane (to the lower right of the window). A dropdown should
appear - select Message1 from this dropdown.
(8) If we wanted to write any more sophisticated logic, we would add, nest and branch
extra activities as appropriate. The CodeActivity enables us to execute .Net
code in Visual Studfio for Applications. To use this, simply drag it on the
Workflow, then double click on the ExecuteCode property in the Properties pane.
For the moment we'll leave our Worflow simply receiving a Message and then re-sending
it.
(9) Save and Close the Workflow editor.
(10) Now we need to create a Workflow Binding. A Workflow Binding is an association
of a Workflow and the ports to be associated with Send and Receive activities along
with any parameter variables. A Workflow can be bound many times, against
different ports or with different parameter data. To create a Binding, select
the Workflow in the SmartsIntegrator Explorer tree (under the Workflows node), and
then select the Bindings tab on the right. Click 'New Binding'.

Give the Binding a name, and select the two ports previously created (FilesIn and
FilesOut) respectively as the binding for receivePortActivity1 and sendPortActivity1.

(11) Ensure the Ports are enabled, and copy a test file into C:\Test1.
This
can be any file, as we didn't specify a schema for either of the Ports. It
should disappear within a couple of seconds, and a copy (named as a GUID) should
appear in C:\FilesOut. If the file doesn't disappear, double
check that the Receive Port is enabled and the Server is running. If it disappears
but doesn't reappear, double check that the Send Port is enabled and the Server
is running, and also check the Tracking log for errors. You access the Tracking
log by selecting the Tracking node in the SmartsIntegrator Explorer tree.
If you encounter any problems, please contact
support@smartsintegrator.com.
See Step 4 : Creating a Schema...
|
|
|
Limited time offer - Get full SmartsIntegrator licenses with 75% off |
Yes, for the moment full SmartsIntegrator
licenses are just 25% of regular price.
That's an unbelievable price of just $499 (£295, 375 EURO) per
machine. And all licenses include 12 months of free software updates and basic email support.
This can't last for long as we really do need to make some revenue, but for the
moment our priority is to get SmartsIntegrator established in the marketplace.
Take advantage of this fantastic opportunity now... |
 |
|
|
|
|