01-13-2012 02:36 PM
package edu.mayo.mi3c.xb3.designer;
import org.activiti.designer.integration.servicetask.AbstractCustomServiceTask;
import org.activiti.designer.integration.servicetask.PropertyType;
import org.activiti.designer.integration.servicetask.annotation.Help;
import org.activiti.designer.integration.servicetask.annotation.Property;
import org.activiti.designer.integration.servicetask.annotation.Runtime;
@DeweyTask
@SuppressWarnings("unused")
@Runtime(delegationClass = "edu.mayo.mi3c.xb3.task.ClassifySeriesTask")
@Help(displayHelpShort = "Classify a series", displayHelpLong = "Assign tags to the BO associated with this series")
public class ClassifySeriesItem extends AbstractCustomServiceTask {
@Property(type = PropertyType.TEXT, displayName = "Extra Tags", required = false, defaultValue = "")
@Help(displayHelpShort = "Tags", displayHelpLong = "Comma-separated list of extra tags to add to the BO")
private String tags;
@Property(type = PropertyType.BOOLEAN_CHOICE, displayName = "Wait for completion", required = true, defaultValue = "true")
@Help(displayHelpShort = "Wait for task completion", displayHelpLong = "If checked, the workflow item does not complete until DEWEY executes the required functionality. If unchecked, execution immediately continues and the next step in the workflow is assumed to be a 'Receive' task")
private Boolean synchronous;
@Override
public String getSmallIconPath() {
return "icons/folder_fill_16x16.png";
}
@Override
public String getName() {
return "Classify Series";
}
}
package edu.mayo.mi3c.xb3.designer;
import org.activiti.designer.integration.servicetask.AbstractCustomServiceTask;
import org.activiti.designer.integration.servicetask.PropertyType;
import org.activiti.designer.integration.servicetask.annotation.Help;
import org.activiti.designer.integration.servicetask.annotation.Property;
import org.activiti.designer.integration.servicetask.annotation.Runtime;
@DeweyTask
@SuppressWarnings("unused")
@Runtime(delegationClass = "edu.mayo.mi3c.xb3.task.ClassifySeriesTask")
@Help(displayHelpShort = "Classify a series", displayHelpLong = "Assign tags to the BO associated with this series")
public class ClassifySeriesItem extends AbstractCustomServiceTask {
@Property(type = PropertyType.BOOLEAN_CHOICE, displayName = "Wait for completion", required = true, defaultValue = "true")
@Help(displayHelpShort = "Wait for task completion", displayHelpLong = "If checked, the workflow item does not complete until DEWEY executes the required functionality. If unchecked, execution immediately continues and the next step in the workflow is assumed to be a 'Receive' task")
private Boolean synchronous;
@Override
public String getSmallIconPath() {
return "icons/folder_fill_16x16.png";
}
@Override
public String getName() {
return "Classify Series";
}
}
01-16-2012 03:33 AM
01-16-2012 08:12 AM
So you're saying the BOOLEAN_CHOICE doesn't write to the XML if it's the only property for that task? That sounds like a bug to me. Could you file an issue in Jira for this?
Also, out of curiosity, I noticed you have an @DeweyTask annotation. Have you made any changes to Designer to somehow use that annotation? It might interfere somehow.
04-18-2012 03:37 AM
04-18-2012 04:15 AM
04-18-2012 04:52 AM
04-18-2012 04:56 AM
04-18-2012 07:58 AM
04-18-2012 08:11 AM
Thnks for ur suggestion tiesebarrell.
Now my delegate class look like
package org.acme.runtime;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
public class AcmeMoneyJavaDelegation implements JavaDelegate {
private String accountNumber;
private String comments;
private String maximumProcessingTime;
private String vipCustomer;
private String accountType;
private String withdrawlLimit;
private String expiryDate;
@Override
public void execute(DelegateExecution execution) throws Exception {
System.out.println("The delegrate class is called");
}
}
But i am facing an error
package org.acme.runtime;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
public class AcmeMoneyJavaDelegation implements JavaDelegate {
private Expression accountNumber;
private Expression comments;
private Expression maximumProcessingTime;
private Expression vipCustomer;
private Expression accountType;
private Expression withdrawlLimit;
private Expression expiryDate;
@Override
public void execute(DelegateExecution execution) throws Exception {
System.out.println("The delegrate class is called");
System.out.println ( "The accountNumber is: " + accountNumber.getValue(execution).toString() );
}
}
04-18-2012 09:13 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.