-
Notifications
You must be signed in to change notification settings - Fork 8
3 Using microservices
If we already have a workflow:
- Go to file.
- Open Workflow.
- Navigate to your existing file.
- Click “OK”, the workflow diagram and the workflow panel will propagate.
If we want to create a new workflow, here are the steps that will be performed. Steps:
- Choose a new workflow from the file menu.
- Add services to Taverna.
- click import new service and then click on WSDL services from the dropdown.
- Enter the URL of WSDL. Say for an example, you installed the Islandora Soap Services on a server with a domain of service.mydomain.com the services WSDL could be at http://services.mydomain.com/soap_server/soap_serv.php?wsdl
- Click ok and the service will be added.
- To add service, click on one and in the service panel and drag it into the Workflow Diagram or to the tree in the workflow Explorer.
- Right click on the new service and click choose show ports. This will gives us an idea of what input and output ports we have to work with.
- the workflow needs input, For most Islandora workflows we will need a pid and dsid.
- Right click on the blank area of the workflow Diagram and select insert--> Workflow input port. Enter the name of the port(pid in our case). Click ok and new input appear in the workflow diagram and the workflow Explorer.
- Do the same thing to create a port for dsid.
- Right click on the dsid input port of the service and connect it to either an existing workflow input port like dsid or you can use a constant value you, such as OBJ. If you use a constant value you can share a workflow with different methods like addDatastream and ingest. Ingest workflows won't get passed a dsid as Fedora does not include a dsid in the JMS message.
- Most other service input ports will be configured by using constants, such as outputdsid, resize etc., except for pid which must be linked to a workflow input port.
- Right click on the pid service input port and choose connect with output from and click pid.
- Now to output, Right click on exit_status service output port and choose Connect as input to and then click New workflow output port and choose the default text supplied.
![image](images/example_workflow_diagram - New Page.png)
To enable workflows each objects Content Model object must have a datastream named "Trigger-Datastreams" which dictates when each t2flow should be run.
"Trigger-Datastreams" contains each method type (e.g ingest, addDatstream, modifyDatastreamByReference, etc )
Inside each method type, we can dictate any t2flows that should be run whenever a method occurs.
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.
Those are:
- modifyDatasstreamByValue - modifying a fedora object’s datastream value
- modifyDatastreamByReference - modifying a fedora object’s datastream content
- ingest - creating a new fedora object
- purgeObject - purging a fedora object
- purgeDatastream - purging individual datastream
- addDatastream - adding a new data stream
A example datastream can be find here:
https://github.com/roblib/php_listeners/wiki/Appendix-A-:-An-Example-Trigger-Datastream
E.g A t2flow should be run when a data stream is modified, and that data stream's dsid is "OBJ".
Adding a T2Flow document created in the taverna workbench to a current content model for future use can be done through the following steps:
- Log into the fedora admin server. Default address will look like http://domainname:8080/fedora/admin however this may vary depending on fedora installation. Input appropriate credentials to log in.
- On the search tab on the right enter the name of the content model. For example: “audio” would be used to search for the audio content model. Select the appropriate option from the drop down menu.
- Next, add a new datastream. Enter the information displayed in the image below This should cause a new datastream to be created for the object and allow the t2flow object to be added to the content model. Refresh the data streams.
- This can be verified by opening the object’s XML via the view object xml option.
Note: There could be many t2flow documents stored for each content model. They will all be of the type t2flow-doc, however they will have unique identifying dsids or UUIDs. The dsids should match corresponding entries in the Trigger-Datastreams data stream xml