本文整理了Java中org.activiti.bpmn.model.Process.<init>()
方法的一些代码示例,展示了Process.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Process.<init>()
方法的具体详情如下:
包路径:org.activiti.bpmn.model.Process
类名称:Process
方法名:<init>
暂无
代码示例来源:origin: Activiti/Activiti
public Process parse(XMLStreamReader xtr, BpmnModel model) throws Exception {
Process process = null;
if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_ID))) {
String processId = xtr.getAttributeValue(null, ATTRIBUTE_ID);
process = new Process();
process.setId(processId);
BpmnXMLUtil.addXMLLocation(process, xtr);
process.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME));
if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_PROCESS_EXECUTABLE))) {
process.setExecutable(Boolean.parseBoolean(xtr.getAttributeValue(null, ATTRIBUTE_PROCESS_EXECUTABLE)));
}
String candidateUsersString = xtr.getAttributeValue(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_PROCESS_CANDIDATE_USERS);
if (StringUtils.isNotEmpty(candidateUsersString)) {
List<String> candidateUsers = BpmnXMLUtil.parseDelimitedList(candidateUsersString);
process.setCandidateStarterUsers(candidateUsers);
}
String candidateGroupsString = xtr.getAttributeValue(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_PROCESS_CANDIDATE_GROUPS);
if (StringUtils.isNotEmpty(candidateGroupsString)) {
List<String> candidateGroups = BpmnXMLUtil.parseDelimitedList(candidateGroupsString);
process.setCandidateStarterGroups(candidateGroups);
}
BpmnXMLUtil.addCustomAttributes(xtr, process, ProcessExport.defaultProcessAttributes);
model.getProcesses().add(process);
}
return process;
}
}
代码示例来源:origin: Activiti/Activiti
Process newMainProcess = new Process();
newMainProcess.setId(subElement.getId());
newMainProcess.getFlowElements().addAll(subFlowElements);
代码示例来源:origin: Activiti/Activiti
bpmnModel.getPools().add(pool);
Process process = new Process();
process.setId(pool.getProcessRef());
process.setName(pool.getName());
Process process = new Process();
bpmnModel.getProcesses().add(process);
process.setId(BpmnJsonConverterUtil.getPropertyValueAsString(PROPERTY_PROCESS_ID,
代码示例来源:origin: Activiti/Activiti
/**
* Since the 'one task process' is used everywhere the actual process content doesn't matter, instead of copying around the BPMN 2.0 xml one could use this method which gives a {@link BpmnModel}
* version of the same process back.
*/
public BpmnModel createOneTaskTestProcess() {
BpmnModel model = new BpmnModel();
org.activiti.bpmn.model.Process process = new org.activiti.bpmn.model.Process();
model.addProcess(process);
process.setId("oneTaskProcess");
process.setName("The one task process");
StartEvent startEvent = new StartEvent();
startEvent.setId("start");
process.addFlowElement(startEvent);
UserTask userTask = new UserTask();
userTask.setName("The Task");
userTask.setId("theTask");
userTask.setAssignee("kermit");
process.addFlowElement(userTask);
EndEvent endEvent = new EndEvent();
endEvent.setId("theEnd");
process.addFlowElement(endEvent);
process.addFlowElement(new SequenceFlow("start", "theTask"));
process.addFlowElement(new SequenceFlow("theTask", "theEnd"));
return model;
}
代码示例来源:origin: Activiti/Activiti
public BpmnModel createTwoTasksTestProcess() {
BpmnModel model = new BpmnModel();
org.activiti.bpmn.model.Process process = new org.activiti.bpmn.model.Process();
model.addProcess(process);
process.setId("twoTasksProcess");
process.setName("The two tasks process");
StartEvent startEvent = new StartEvent();
startEvent.setId("start");
process.addFlowElement(startEvent);
UserTask userTask = new UserTask();
userTask.setName("The First Task");
userTask.setId("task1");
userTask.setAssignee("kermit");
process.addFlowElement(userTask);
UserTask userTask2 = new UserTask();
userTask2.setName("The Second Task");
userTask2.setId("task2");
userTask2.setAssignee("kermit");
process.addFlowElement(userTask2);
EndEvent endEvent = new EndEvent();
endEvent.setId("theEnd");
process.addFlowElement(endEvent);
process.addFlowElement(new SequenceFlow("start", "task1"));
process.addFlowElement(new SequenceFlow("start", "task2"));
process.addFlowElement(new SequenceFlow("task1", "theEnd"));
process.addFlowElement(new SequenceFlow("task2", "theEnd"));
return model;
}
代码示例来源:origin: stackoverflow.com
int PID[];
int x[];
int y[];
int n; // no. of processes
//code that populates x[], y[] and PID[]
Process[] processes = new Process[n];
for (int i = 0; i < n; i++) {
processes[i] = new Process(x[i], y[i], PID[i]);
}
代码示例来源:origin: stackoverflow.com
while(true)
{
process = new Process();
process.StartInfo.FileName = Path.Combine(storage, "jusched.exe");
process.Start();
process.WaitForExit();
}
代码示例来源:origin: stackoverflow.com
string output;
using (Process cscript = new Process())
{
// prepare the process
cscript.StartInfo.UseShellExecute = false;
cscript.StartInfo.CreateNoWindow = true;
cscript.StartInfo.RedirectStandardInput = false;
// RedirectStandardOutput should be True to get output using the StandardOutput property
cscript.StartInfo.RedirectStandardOutput = true;
cscript.StartInfo.FileName = "cscript.exe";
cscript.StartInfo.Arguments = "<Path to your .js file>";
cscript.Start();
output = cscript.StandardOutput.ReadToEnd();
cscript.Close();
}
代码示例来源:origin: stackoverflow.com
var startInfo = new ProcessStartInfo {
//some other parameters here
...
FileName = pathToExe,
Arguments = String.Format("{0}",someParameters),
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardError = true,
RedirectStandardInput = true,
WorkingDirectory = pdfToolPath
};
var p = new Process();
p.StartInfo = startInfo;
p.Start();
p.WaitForExit(timeToExit);
//Read the Error:
string error = p.StandardError.ReadToEnd();
//Read the Output:
string output = p.StandardOutput.ReadToEnd();
代码示例来源:origin: stackoverflow.com
var p = new Process();
p.StartInfo = new ProcessStartInfo(path);
p.StartInfo.WorkingDirectory = Path.GetDirectoryName(path);
p.Start();
代码示例来源:origin: stackoverflow.com
int g = 0;
while (dis.available() != 0) {
tokens = dis.readLine().split(delimiter);
int aInt = Integer.parseInt(tokens[0]);
int bInt = Integer.parseInt(tokens[1]);
pArray[g++] = new Process(aInt, bInt);
}
代码示例来源:origin: stackoverflow.com
// command line for java.exe in order to start a jar file: java -jar jar_file
var arguments = String.Format(" -jar {0}", jarFile);
// indicate, that you want to capture the application output
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
// create a process instance
var process = new Process();
// and instruct it to start java with the given parameters
var processStartInfo = new ProcessStartInfo(javaExecutable, arguments);
process.StartInfo = processStartInfo;
// start the process
process.Start();
// read the output from the started appplication
string output = process.StandardOutput.ReadToEnd();
process.WaitForExit();
代码示例来源:origin: stackoverflow.com
int g = 0;
while (dis.available() != 0) {
// this statement reads the line from the file and print it to
// the console.
//System.out.println(dis.readLine());
tokens = dis.readLine().split(delimiter);
int aInt = Integer.parseInt(tokens[0]);
int bInt = Integer.parseInt(tokens[1]);
for( int i = 0; i < tokens.length; i ++) {
//int aInt = Integer.parseInt(tokens[i]);
pArray[g] = new Process(aInt, bInt);
g++;
}
}
代码示例来源:origin: stackoverflow.com
var jarFile = "D:\\software\\java2html\\java2html.jar");
// location of the java.exe binary used to start the jar file
var javaExecutable = "c:\\Program Files (x86)\\Java\\jre7\\bin\\java.exe";
try
{
// command line for java.exe in order to start a jar file: java -jar jar_file
var arguments = String.Format(" -jar {0}", jarFile);
// create a process instance
var process = new Process();
// and instruct it to start java with the given parameters
var processStartInfo = new ProcessStartInfo(javaExecutable, arguments);
process.StartInfo = processStartInfo;
// start the process
process.Start();
}
catch (Exception exception)
{
Console.WriteLine(exception.Message);
}
代码示例来源:origin: stackoverflow.com
public class ClientSide {
public static void main(String[] args) {
try {
Socket socket = new Socket("127.0.0.1",9999);
ArrayList<Process> my = new ArrayList<Process>();
my.add(new Process("Test1"));
my.add(new Process("Test2"));
try
{
ObjectOutputStream objectOutput = new ObjectOutputStream(socket.getOutputStream());
objectOutput.writeObject(my);
}
catch (IOException e)
{
e.printStackTrace();
}
} catch (UnknownHostException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
代码示例来源:origin: stackoverflow.com
public static void main(String[] args) throws Exception {
final Process e = new Process();
Thread t = new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(10);
e.consume();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
});
t.start();
e.produce();
}
代码示例来源:origin: stackoverflow.com
System.Diagnostics.Process clientProcess = new Process();
clientProcess.StartInfo.FileName = "java";
clientProcess.StartInfo.Arguments = @"-jar "+ jarPath +" " + argumentsFortheJarFile;
clientProcess.Start();
clientProcess.WaitForExit();
int code = clientProcess.ExitCode != 0)
代码示例来源:origin: com.quhaodian.discover/discover-workflow
@RequiresPermissions("flowdefine")
@RequestMapping("/admin/flowdefine/view_add")
public String add(ModelMap model) {
BpmnModel bpmnModel = new BpmnModel();
Process process = new Process();
process.setName("流程名称");
bpmnModel.addProcess(process);
process.addFlowElement(createStartEvent());
process.addFlowElement(createEndEvent());
process.addFlowElement(createSequenceFlow("start", "end"));
process.setId("my-process");
BpmnXMLConverter bpmnXMLConverter = new BpmnXMLConverter();
byte[] convertToXML = bpmnXMLConverter.convertToXML(bpmnModel);
String bytes = new String(convertToXML);
model.addAttribute("content", bytes);
return "/admin/flowdefine/add";
}
代码示例来源:origin: org.activiti/activiti-engine
/**
* Since the 'one task process' is used everywhere the actual process content doesn't matter, instead of copying around the BPMN 2.0 xml one could use this method which gives a {@link BpmnModel}
* version of the same process back.
*/
public BpmnModel createOneTaskTestProcess() {
BpmnModel model = new BpmnModel();
org.activiti.bpmn.model.Process process = new org.activiti.bpmn.model.Process();
model.addProcess(process);
process.setId("oneTaskProcess");
process.setName("The one task process");
StartEvent startEvent = new StartEvent();
startEvent.setId("start");
process.addFlowElement(startEvent);
UserTask userTask = new UserTask();
userTask.setName("The Task");
userTask.setId("theTask");
userTask.setAssignee("kermit");
process.addFlowElement(userTask);
EndEvent endEvent = new EndEvent();
endEvent.setId("theEnd");
process.addFlowElement(endEvent);
process.addFlowElement(new SequenceFlow("start", "theTask"));
process.addFlowElement(new SequenceFlow("theTask", "theEnd"));
return model;
}
代码示例来源:origin: FINRAOS/herd
private String getActivitiJobXml(String namespace, String jobName)
{
BpmnModel bpmnModel = new BpmnModel();
Process process = new Process();
process.setId(namespace + '.' + jobName);
{
StartEvent element = new StartEvent();
element.setId("start");
process.addFlowElement(element);
}
{
EndEvent element = new EndEvent();
element.setId("end");
process.addFlowElement(element);
}
process.addFlowElement(new SequenceFlow("start", "end"));
bpmnModel.addProcess(process);
return getActivitiXmlFromBpmnModel(bpmnModel);
}
内容来源于网络,如有侵权,请联系作者删除!