Merged V1.3 to V1.4 (Workflow changes required)

svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4152 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4153 .
   svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4163 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4164 .
   svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4178 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4179 .
   svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4328 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4329 .
   svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4331 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4332 .



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4529 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-12-06 16:03:37 +00:00
parent f5f4a867f7
commit 5b086fc759
5 changed files with 144 additions and 45 deletions

View File

@@ -253,40 +253,37 @@ public class ManageTaskDialog extends BaseDialogBean
}
}
if (selectedTransition != null)
UserTransaction tx = null;
try
{
UserTransaction tx = null;
try
{
tx = Repository.getUserTransaction(context);
tx.begin();
// prepare the edited parameters for saving
Map<QName, Serializable> params = WorkflowUtil.prepareTaskParams(this.taskNode);
if (logger.isDebugEnabled())
logger.debug("Transitioning task with parameters: " + params);
// update the task with the updated parameters
this.workflowService.updateTask(this.task.id, params, null, null);
// signal the selected transition to the workflow task
this.workflowService.endTask(this.task.id, selectedTransition);
// commit the changes
tx.commit();
if (logger.isDebugEnabled())
logger.debug("Ended task with transition: " + selectedTransition);
}
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
Utils.addErrorMessage(formatErrorMessage(e), e);
outcome = this.getErrorOutcome(e);
}
tx = Repository.getUserTransaction(context);
tx.begin();
// prepare the edited parameters for saving
Map<QName, Serializable> params = WorkflowUtil.prepareTaskParams(this.taskNode);
if (logger.isDebugEnabled())
logger.debug("Transitioning task with parameters: " + params);
// update the task with the updated parameters
this.workflowService.updateTask(this.task.id, params, null, null);
// signal the selected transition to the workflow task
this.workflowService.endTask(this.task.id, selectedTransition);
// commit the changes
tx.commit();
if (logger.isDebugEnabled())
logger.debug("Ended task with transition: " + selectedTransition);
}
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
Utils.addErrorMessage(formatErrorMessage(e), e);
outcome = this.getErrorOutcome(e);
}
return outcome;

View File

@@ -202,7 +202,7 @@ public class StartWorkflowWizard extends BaseWizardBean
logger.debug("Start task definition: " + taskDef);
// create an instance of a task from the data dictionary
this.startTaskNode = new TransientNode(taskDef.metadata.getName(),
this.startTaskNode = TransientNode.createNew(dictionaryService, taskDef.metadata,
"task_" + System.currentTimeMillis(), null);
}