forked from rwincewicz/php_listeners
-
Notifications
You must be signed in to change notification settings - Fork 8
3 Using microservices
yqjiang edited this page May 28, 2013
·
13 revisions
2) Enter the URL of WSDL. Say for an example, we are making a list of countries workflow and the url here is: http://www.webservicex.com/globalweather.asmx?WSDL
“WSDL @ http://www.webservicex.com/globalweather.asmx?WSDL”
.
4. To add service, click on GetCitiesByCountry in the service panel and drag it into the Workflow Diagram or to the tree in the workflow Explorer.
5. the workflow needs input, in our case we will use country to the query. Right click on the blank area of the workflow Diagram and select insert--> Workflow input port. Enter the name of the port(country in our case). Click ok and new input appear in the workflow diagram and the workflow Explorer.
6. Now to output, we need to do the same thing except insert → workflow output port and using the name “cities” to create an output.
7. to split the WSDL inputs and outputs, right click on the service GetCitiesByCountryin the workflow Diagram or Workflow Explorer and select show details. Scroll down and add input XML splitter and Add output XML splitter, choosing parameters in both cases.
8. To link the input port, click on “country” and drag to the “GetCitiesByCountry_input”. A arrow connection will be established. If there are multiple ports that could have been connectd multiple options with arrows will be shown.
9. Similarly output port can be linked by selecting and draging to “GetCitiesByCountry”. A green arrow will show up in this case.
10. We can run the workflow by file---> Run workflow. In the workflow inputs dialog, we can click new value button and replace the string by your chosen value.
The process for creating a workflow with Islandora microservices is similar to above. However, there are details specific to these microservices.
https://github.com/roblib/php_listeners/wiki/Microservice-Functions---Accepted-File-Extensions
To use them, input ports must be added for all inputs, or a constant value set in the workflow for that input. An output port must also be set to receive the exit_status, but is not needed for attachment list.
The code can potentially be changed to return not just an exit status, but the DSID of the generated output for use in chaining microservices. However, this is not currently implemented.
The content model has a data stream named "Trigger-Datastreams" which dictates when each t2flow should be run.
"Trigger-Datastreams" contains each method type (e.g ingest, addDatstream, modifyDatastreamByReference, etc )
We can also dictate that a t2flow should only be run when the method occurs on a specific data stream. There are several methods that are supported for the trigger datastreams object.
https://github.com/roblib/php_listeners/wiki/Appendix-A-:-An-Example-Trigger-Datastreams