protected void addWorkflowDescriptor() throws WorkflowException
{
ConditionDescriptor condition = DescriptorFactory.getFactory().createConditionDescriptor();
condition.setType("class");
final Map conditionArgs = condition.getArgs();
conditionArgs.put("class.name", getDescriptor().getImplementationClass().getName());
WorkflowPluginConditionFactory workflowConditionFactory = (WorkflowPluginConditionFactory) getDescriptor().getModule();
conditionArgs.putAll(workflowConditionFactory.getDescriptorParams(getDescriptorParams()));
WorkflowEditorTransitionConditionUtil wetcu = new WorkflowEditorTransitionConditionUtil();
if (isNested())
currentConditionCount = wetcu.addNestedCondition(getTransition(), getCount(), condition);
else
currentConditionCount = wetcu.addCondition(getTransition(), getCount(), condition);
workflowService.updateWorkflow(getJiraServiceContext(), getWorkflow());
}