Author: salaboy21
Date: 2008-07-10 08:13:06 -0400 (Thu, 10 Jul 2008)
New Revision: 1570
Added:
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java
Log:
New webservices implementation, new extended methods
Added:
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java
===================================================================
---
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java
(rev 0)
+++
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java 2008-07-10
12:13:06 UTC (rev 1570)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jbpm.command.ws2;
+
+import java.util.List;
+
+/**
+ * JPDL web service interface
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @author Salaboy21 (mailto:salaboy@gmail.com)
+ */
+
+
+public interface JPDLWebServiceFacade
+{
+ /**
+ * Creates a new process instance and return the initla token.
+ * If it should be started the default transition is used.
+ *
+ * @param processRequest process reference info
+ * @return a token reference
+ */
+ // TokenRef newProcessInstance(ProcessRequest processRequest);
+
+ ProcessInstanceRef newProcessInstance(ProcessRequest processRequest);
+
+ /**
+ * Signals a token to proceed with (an optional) transition.
+ *
+ * @param signalRequest
+ * @return a token reference
+ */
+ TokenRef signal(SignalRequest signalRequest);
+
+ /**
+ * Cancel a process .
+ *
+ * @param processRequest process reference info (name)
+ * @return true if the operation success
+ */
+ public boolean cancelProcessInstance(ProcessInstanceRef processRef);
+
+
+ public void setProcessVariable(ProcessInstanceRef processRef,String
variableName,Object value);
+
+ public List<ProcessDefinitionRef> getProcessDefinitions(boolean onlyLatest);
+}
Property changes on:
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceFacade.java
___________________________________________________________________
Name: svn:executable
+ *
Added:
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java
===================================================================
---
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java
(rev 0)
+++
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java 2008-07-10
12:13:06 UTC (rev 1570)
@@ -0,0 +1,206 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jbpm.command.ws2;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.JbpmException;
+import org.jbpm.command.CancelProcessInstanceCommand;
+import org.jbpm.command.Command;
+import org.jbpm.command.GetProcessDefinitionsCommand;
+import org.jbpm.command.GetProcessInstancesCommand;
+import org.jbpm.command.NewProcessInstanceCommand;
+import org.jbpm.command.SignalCommand;
+import org.jbpm.command.StartProcessInstanceCommand;
+import org.jbpm.command.VariablesCommand;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+import org.w3c.dom.Element;
+
+
+/**
+ * Web service frontend to the command facade
+ *
+ * @author Heiko.Braun(a)jboss.com
+ */
+@WebService()
+//@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public class JPDLWebServiceImpl implements JPDLWebServiceFacade
+{
+ private static Log log = LogFactory.getLog(JPDLWebServiceImpl.class);
+
+
+
+ @WebMethod()
+ public ProcessInstanceRef newProcessInstance(ProcessRequest processRequest)
+ {
+ log.debug("New process " + processRequest.getProcessDefinitionName());
+
+ // we either start it immediatley or just create the process instance
+ NewProcessInstanceCommand cmd = processRequest.isStart() ?
+ new StartProcessInstanceCommand() : new NewProcessInstanceCommand();
+ cmd.setProcessName( processRequest.getProcessDefinitionName() );
+ //I must be able to add the version of the process definition that i want...
Salaboy
+ Object result = executeCommand(cmd);
+ ProcessInstanceRef processRef=new ProcessInstanceRef((ProcessInstance)result);
+
+ return processRef;
+ }
+
+
+
+ @WebMethod()
+ public TokenRef signal(SignalRequest signalRequest)
+ {
+ log.debug("Signal token " + signalRequest.getTokenId());
+
+ SignalCommand cmd = new SignalCommand(
+ signalRequest.getTokenId(),
+ signalRequest.getTransitionName()
+ );
+
+ // Associate process variables
+ addProcessVariables(cmd, signalRequest);
+
+ Token token = (Token)executeCommand(cmd);
+
+ return new TokenRef(token);
+
+ }
+ @SuppressWarnings("unchecked")
+ @WebMethod()
+ public List<ProcessDefinitionRef> getProcessDefinitions(boolean onlyLatest) {
+ GetProcessDefinitionsCommand cmd=new GetProcessDefinitionsCommand();
+ cmd.setOnlyLatest(onlyLatest);
+
+ List<ProcessDefinition> processDefs=(List<ProcessDefinition>)
executeCommand(cmd);
+ List<ProcessDefinitionRef> result=new ArrayList<ProcessDefinitionRef>();
+ for (ProcessDefinition processDefinition : processDefs) {
+ result.add(new
ProcessDefinitionRef(processDefinition.getName(),processDefinition.getVersion()));
+ }
+ return result;
+
+ }
+
+
+ @SuppressWarnings("unchecked")
+ @WebMethod()
+ public List<ProcessInstanceRef> getProcessInstances(ProcessDefinitionRef
processDefinitionRef) {
+ GetProcessInstancesCommand cmd=new GetProcessInstancesCommand();
+ cmd.setProcessName(processDefinitionRef.getProcessDefinitionName());
+
+
+ List<ProcessInstance> processInstances=(List<ProcessInstance>)
executeCommand(cmd);
+ List<ProcessInstanceRef> result=new ArrayList<ProcessInstanceRef>();
+ for (ProcessInstance processInstance : processInstances) {
+ result.add(new ProcessInstanceRef(processInstance.getId(),
+ processInstance.getProcessDefinition().getName(),
+ processInstance.getProcessDefinition().getVersion(),
+ processInstance.getRootToken().getId(),
+ processInstance.getRootToken().getNode().getName()));
+ }
+ return result;
+
+ }
+
+
+ @WebMethod()
+ public boolean cancelProcessInstance(ProcessInstanceRef processInstanceRef){
+ CancelProcessInstanceCommand cmd=new CancelProcessInstanceCommand();
+ cmd.setProcessId(processInstanceRef.getProcessInstanceId());
+
+ executeCommand(cmd);
+
+ return true;
+
+ }
+
+ //REVIEW!!!!!! AND TEST!!!! NOT FINISHED!!!
+ @WebMethod()
+ public void setProcessVariable(ProcessInstanceRef processRef,String
variableName,Object value){
+ VariablesCommand cmd=new VariablesCommand();
+ Map<String,Object> variables=new HashMap<String,Object>();
+ variables.put(variableName, value);
+ cmd.setVariables(variables);
+ executeCommand(cmd);
+ }
+
+
+
+
+ private void addProcessVariables(SignalCommand cmd, SignalRequest signalRequest)
+ {
+ if(signalRequest.getAny()!=null && !signalRequest.getAny().isEmpty())
+ {
+ Map vars = new HashMap( signalRequest.getAny().size() );
+ cmd.setVariables(vars);
+
+ for(Element el : signalRequest.getAny() )
+ {
+ String name = el.getNodeName();
+ String value = el.getTextContent(); // TODO: type conversion
+
+ cmd.getVariables().put( name, value );
+ }
+ }
+ }
+
+ private Object executeCommand(Command command)
+ {
+ JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
+ Object result = null;
+ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+ try
+ {
+ log.debug("Executing " + command);
+ result = command.execute(jbpmContext);
+ }
+ catch (Exception e)
+ {
+ throw new JbpmException(
+ "Failed to execute '" + command + "': " +
e.getMessage(), e
+ );
+ }
+ finally
+ {
+ jbpmContext.close();
+ }
+
+ return result;
+ }
+
+
+
+
+}
Property changes on:
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/JPDLWebServiceImpl.java
___________________________________________________________________
Name: svn:executable
+ *
Added:
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java
===================================================================
---
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java
(rev 0)
+++
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java 2008-07-10
12:13:06 UTC (rev 1570)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jbpm.command.ws2;
+
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.Token;
+
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * Reference info about a token
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @author Salaboy21 (mailto:salaboy@gmail.com)
+ *
+ */
+
+@XmlType(
+ name = "processDefinitionReference",
+ namespace = "http://jbpm.org/jpdl/ws/01/2008/"
+)
+public class ProcessDefinitionRef
+{
+ String processDefinitionName;
+ long processVersion;
+
+
+ public ProcessDefinitionRef()
+ {
+ }
+
+ public ProcessDefinitionRef(String processDefinitionName, long processVersion)
+ {
+ this.processDefinitionName = processDefinitionName;
+ this.processVersion = processVersion;
+
+ }
+
+ public ProcessDefinitionRef(ProcessDefinition processDefinition)
+ {
+ this(
+ processDefinition.getName(),
+ processDefinition.getId()
+
+ );
+ }
+
+ public String getProcessDefinitionName() {
+ return processDefinitionName;
+ }
+
+ public void setProcessDefinitionName(String processDefinitionName) {
+ this.processDefinitionName = processDefinitionName;
+ }
+
+ public long getProcessVersion() {
+ return processVersion;
+ }
+
+ public void setProcessVersion(long processVersion) {
+ this.processVersion = processVersion;
+ }
+
+
+
+
+
+}
Property changes on:
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessDefinitionRef.java
___________________________________________________________________
Name: svn:executable
+ *
Added:
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java
===================================================================
---
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java
(rev 0)
+++
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java 2008-07-10
12:13:06 UTC (rev 1570)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jbpm.command.ws2;
+
+import org.jbpm.graph.exe.Token;
+
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * Reference info about a token
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @author Salaboy21 (mailto:salaboy@gmail.com)
+ */
+@XmlType(
+ name = "processInstanceReference",
+ namespace = "http://jbpm.org/jpdl/ws/01/2008/"
+)
+public class ProcessInstanceRef
+{
+
+ long processInstanceId;
+
+ ProcessDefinitionRef processDefinition;
+ TokenRef token;
+
+ public ProcessInstanceRef()
+ {
+ }
+
+ public ProcessInstanceRef(long processInstanceId, String processDefinitionName,long
processVersion,long tokenId,String nodeName)
+ {
+
+ this.processInstanceId = processInstanceId;
+ this.processDefinition = new
ProcessDefinitionRef(processDefinitionName,processVersion);
+ this.token = new TokenRef(tokenId,nodeName);
+ }
+
+ public ProcessInstanceRef(org.jbpm.graph.exe.ProcessInstance processInstance)
+ {
+ this(
+ processInstance.getId(),
+ processInstance.getProcessDefinition().getName(),
+ processInstance.getVersion(),
+ processInstance.getRootToken().getId(),
+ processInstance.getRootToken().getNode().getName()
+
+ );
+ }
+
+
+
+ public long getProcessInstanceId()
+ {
+ return processInstanceId;
+ }
+
+ public void setProcessInstanceId(long processInstanceId)
+ {
+ this.processInstanceId = processInstanceId;
+ }
+
+
+ public TokenRef getToken() {
+ return token;
+ }
+
+ public void setToken(TokenRef token) {
+ this.token = token;
+ }
+
+ public ProcessDefinitionRef getProcessDefinition() {
+ return processDefinition;
+ }
+
+ public void setProcessDefinition(ProcessDefinitionRef processDefinition) {
+ this.processDefinition = processDefinition;
+ }
+
+
+}
Property changes on:
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessInstanceRef.java
___________________________________________________________________
Name: svn:executable
+ *
Added: jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java
(rev 0)
+++
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java 2008-07-10
12:13:06 UTC (rev 1570)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jbpm.command.ws2;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * All that you need about a Process
+ *
+ * @author Salaboy21 (mailto:salaboy@gmail.com)
+ *
+ */
+
+@XmlType(
+ name = "processRequest",
+ namespace = "http://jbpm.org/jpdl/ws/01/2008/"
+)
+public class ProcessRequest
+{
+ private String processDefinitionName;
+ private long version;
+ private boolean start;
+
+ public ProcessRequest()
+ {
+ }
+
+ public ProcessRequest(String processDefinitionName, boolean start)
+ {
+ this.processDefinitionName = processDefinitionName;
+ this.start = start;
+ }
+
+ @XmlElement(required = true)
+ public String getProcessDefinitionName()
+ {
+ return processDefinitionName;
+ }
+
+ public void setProcessDefinitionName(String processDefinitionName)
+ {
+ this.processDefinitionName = processDefinitionName;
+ }
+
+ @XmlAttribute(name = "start", required = false)
+ public boolean isStart()
+ {
+ return start;
+ }
+
+ public void setStart(boolean start)
+ {
+ this.start = start;
+ }
+
+ public long getVersion() {
+ return version;
+ }
+
+ public void setVersion(long version) {
+ this.version = version;
+ }
+}
Property changes on:
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/ProcessRequest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java
===================================================================
--- jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java
(rev 0)
+++
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java 2008-07-10
12:13:06 UTC (rev 1570)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jbpm.command.ws2;
+
+/**
+ * All that you need to make a signal
+ *
+ *
+ * @author Salaboy21 (mailto:salaboy@gmail.com)
+ *
+ */
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import java.util.List;
+
+@XmlType
+ (
+ name = "signalRequest",
+ namespace = "http://jbpm.org/jpdl/ws/01/2008/"
+)
+public class SignalRequest
+{
+ private long tokenId;
+ private String transitionName;
+ private List<Element> any;
+
+ public SignalRequest()
+ {
+ }
+
+ public SignalRequest(long tokenId, String transitionName)
+ {
+ this.tokenId = tokenId;
+ this.transitionName = transitionName;
+ }
+
+ @XmlAttribute(required = true)
+ public long getTokenId()
+ {
+ return tokenId;
+ }
+
+ public void setTokenId(long tokenId)
+ {
+ this.tokenId = tokenId;
+ }
+
+ @XmlElement(required = false)
+ public String getTransitionName()
+ {
+ return transitionName;
+ }
+
+ public void setTransitionName(String transitionName)
+ {
+ this.transitionName = transitionName;
+ }
+
+ @XmlAnyElement
+ public List<Element> getAny()
+ {
+ return any;
+ }
+
+ public void setAny(List<Element> any)
+ {
+ this.any = any;
+ }
+}
Property changes on:
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/SignalRequest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java
===================================================================
--- jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java
(rev 0)
+++
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java 2008-07-10
12:13:06 UTC (rev 1570)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jbpm.command.ws2;
+
+import org.jbpm.graph.exe.Token;
+
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * Reference info about a token
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @author Salaboy21 (mailto:salaboy@gmail.com)
+ *
+ */
+@XmlType(
+ name = "tokenReference",
+ namespace = "http://jbpm.org/jpdl/ws/01/2008/"
+)
+public class TokenRef
+{
+ long tokenId;
+ String nodeName;
+
+
+ public TokenRef()
+ {
+ }
+
+ public TokenRef(long tokenId, String nodeName)
+ {
+ this.tokenId = tokenId;
+ this.nodeName = nodeName;
+
+ }
+
+ public TokenRef(Token token)
+ {
+ this(
+ token.getId(),
+ token.getNode().getName()
+
+ );
+ }
+
+
+ public long getTokenId()
+ {
+ return tokenId;
+ }
+
+ public void setTokenId(long tokenId)
+ {
+ this.tokenId = tokenId;
+ }
+
+ public String getNodeName()
+ {
+ return nodeName;
+ }
+
+ public void setNodeName(String nodeName)
+ {
+ this.nodeName = nodeName;
+ }
+
+
+}
Property changes on:
jbpm3/trunk/modules/jpdl/ws/src/main/java/org/jbpm/command/ws2/TokenRef.java
___________________________________________________________________
Name: svn:executable
+ *