Taverna 2

Nested workflows are put in the entities of InvocationContext

Details

  • Familiarity:
    Similar

Description

It is probably a bug that nested workflow runids are put into the entities of the InvocationContext. It is probable that only the top-level workflow should be specified

Proposed solution:

Stop the nested ids being put in the invocation context

Proposed testing:

One or more unit tests that run a workflow with nesting and check that the entities does not contain more than one worklfow runids.

Issue Links

Activity

Hide
Stian Soiland-Reyes added a comment - 2010-03-31 10:52

supposedly fixed for 2.1.2 - check code.

Show
Stian Soiland-Reyes added a comment - 2010-03-31 10:52 supposedly fixed for 2.1.2 - check code.
Hide
Stian Soiland-Reyes added a comment - 2010-04-26 13:54

Inspection of the code for the net.sf.taverna.t2.facade.impl.WorkflowInstanceFacadeImpl.WorkflowInstanceFacadeImpl(Dataflow, InvocationContext, String) constructor:

if (parentProcess.equals("")) {
			// Top-level workflow
			
			// add top level workflow run so that reference service can generate
			// identifiers linked to our run
			context.addEntity(new WorkflowRunIdEntity(workflowRunId));
			this.instanceOwningProcessId = localName;
			
			// Add this WorkflowInstanceFacade to the map of all workflow run IDs 
			// against the corresponding WorkflowInstanceFacadeS/ - to be used
			// by DependencyActivity's such as API consumer and Beanshell
			workflowRunFacades.put(localName, new WeakReference<WorkflowInstanceFacade>(this));
			// Note that we do not put the IDs for nested workflows, just for the main ones!
		} else {
			// Nested workflow
			this.instanceOwningProcessId = parentProcess + ":" + localName;
		}

ie. the entitiy is not added for nested workflows anymore.

Show
Stian Soiland-Reyes added a comment - 2010-04-26 13:54 Inspection of the code for the net.sf.taverna.t2.facade.impl.WorkflowInstanceFacadeImpl.WorkflowInstanceFacadeImpl(Dataflow, InvocationContext, String) constructor:
if (parentProcess.equals("")) {
			// Top-level workflow
			
			// add top level workflow run so that reference service can generate
			// identifiers linked to our run
			context.addEntity(new WorkflowRunIdEntity(workflowRunId));
			this.instanceOwningProcessId = localName;
			
			// Add this WorkflowInstanceFacade to the map of all workflow run IDs 
			// against the corresponding WorkflowInstanceFacadeS/ - to be used
			// by DependencyActivity's such as API consumer and Beanshell
			workflowRunFacades.put(localName, new WeakReference<WorkflowInstanceFacade>(this));
			// Note that we do not put the IDs for nested workflows, just for the main ones!
		} else {
			// Nested workflow
			this.instanceOwningProcessId = parentProcess + ":" + localName;
		}
ie. the entitiy is not added for nested workflows anymore.
Hide
Alan Williams added a comment - 2010-06-09 15:22

Assigned for testing

Show
Alan Williams added a comment - 2010-06-09 15:22 Assigned for testing

People

Vote (0)
Watch (0)

Dates

  • Created:
    2010-01-27 13:59
    Updated:
    2010-06-10 11:18
    Resolved:
    2010-04-26 13:54

Time Tracking

Estimated:
1h
Original Estimate - 1 hour
Remaining:
0m
Remaining Estimate - 0 minutes
Logged:
10m
Time Spent - 10 minutes Time Not Required