[CMA-45] Optional parameter is actually required in WorkflowService.endTask Created: 06/Aug/09  Updated: 21/May/10  Resolved: 19/May/10

Status: Closed
Project: Remote Alfresco API rivet
Component/s: CMA Impl
Affects Version/s: 1.10.0
Fix Version/s: 3.2.0-E-0

Type: Bug Priority: Major
Reporter: nacho@imaginaworks.com Assignee: sumer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Acording to javadocs @ http://docs.rivetlogic.com/projects/raar/current/javadocs/com/rivetlogic/core/cma/api/WorkflowService.html, the parameter transitionId in endTask is optional (i.e. it can be null, meaning that the default transition should be taken).

But the actual implementation @ https://svn.rivetlogic.org/repos/rivets/core/cma/cma/trunk/modules/cma-impl/src/main/java/com/rivetlogic/core/cma/impl/WorkflowServiceImpl.java checks that parameter as required (line 172):

public WorkflowTask endTask(Ticket ticket, String taskId,
String transitionId) throws InvalidTicketException,
CmaRuntimeException {
// check parameters
ParameterCheck.mandatory("ticket", ticket);
ParameterCheck.mandatoryString("taskId", taskId);
----->>>>ParameterCheck.mandatoryString("transitionId", transitionId);

String methodName = CmaConstants.METHOD_WORKFLOW_ENDTASK;
// create parameters
Vector<NameValuePair> parameters = createGeneralParameters(ticket, methodName);
parameters.add(new NameValuePair(CmaConstants.PARAM_TASKID, taskId));
parameters.add(new NameValuePair(CmaConstants.PARAM_TRANSITIONID, transitionId));
parameters.add(new NameValuePair(CmaConstants.PARAM_USETRANSACTION, true));

return (WorkflowTask) execute(ticket, methodName, parameters);
}

As a result of this, we cannot invoke the default transition when ending a task.
Generated at Sat Feb 10 05:51:33 GMT 2024 using Jira 8.1.3#801003-sha1:6b6f07cffadda9a0d6efe24639daed8ce94dcdd6.