Tabnine Logo
Model.setDeploymentId
Code IndexAdd Tabnine to your IDE (free)

How to use
setDeploymentId
method
in
org.activiti.engine.repository.Model

Best Java code snippets using org.activiti.engine.repository.Model.setDeploymentId (Showing top 5 results out of 315)

origin: bluejoe2008/openwebflow

public static Deployment deployModel(RepositoryService repositoryService, String modelId) throws IOException
{
  Model modelData = repositoryService.getModel(modelId);
  //EditorSource就是XML格式的
  byte[] bpmnBytes = repositoryService.getModelEditorSource(modelId);
  String processName = modelData.getName() + ".bpmn20.xml";
  Deployment deployment = repositoryService.createDeployment().name(modelData.getName())
      .addString(processName, new String(bpmnBytes, "utf-8")).deploy();
  //设置部署ID
  modelData.setDeploymentId(deployment.getId());
  repositoryService.saveModel(modelData);
  return deployment;
}
origin: bill1012/AdminEAP

  repositoryService.setProcessDefinitionCategory(processDefinition.getId(), deployment.getCategory());
modelData.setDeploymentId(deployment.getId());
repositoryService.saveModel(modelData);
return new Result(true);
origin: org.activiti/activiti-rest

 @ApiOperation(value = "Create a model", tags = {"Models"}, notes = "All request values are optional. For example, you can only include the name attribute in the request body JSON-object, only setting the name of the model, leaving all other fields null.")
 @ApiResponses(value = {
   @ApiResponse(code = 200, message = "Indicates the model was created.")
 })
 @RequestMapping(value = "/repository/models", method = RequestMethod.POST, produces = "application/json")
 public ModelResponse createModel(@RequestBody ModelRequest modelRequest, HttpServletRequest request, HttpServletResponse response) {
  Model model = repositoryService.newModel();
  model.setCategory(modelRequest.getCategory());
  model.setDeploymentId(modelRequest.getDeploymentId());
  model.setKey(modelRequest.getKey());
  model.setMetaInfo(modelRequest.getMetaInfo());
  model.setName(modelRequest.getName());
  model.setVersion(modelRequest.getVersion());
  model.setTenantId(modelRequest.getTenantId());

  repositoryService.saveModel(model);
  response.setStatus(HttpStatus.CREATED.value());
  return restResponseFactory.createModelResponse(model);
 }
}
origin: com.github.tianjing/tgtools.activiti.modeler

@RequestMapping(value = "/model/deploy/{id}", method = RequestMethod.POST)
public ResponseCode deploy(@PathVariable("id") String id) throws Exception {
  //获取模型
  Model modelData = repositoryService.getModel(id);
  byte[] bytes = repositoryService.getModelEditorSource(modelData.getId());
  if (bytes == null) {
    return ResponseCode.error("模型数据为空,请先设计流程并成功保存,再进行发布。");
  }
  JsonNode modelNode = new ObjectMapper().readTree(bytes);
  BpmnModel model = new BpmnJsonConverter().convertToBpmnModel(modelNode);
  if (model.getProcesses().size() == 0) {
    return ResponseCode.error("数据模型不符要求,请至少设计一条主线流程。");
  }
  byte[] bpmnBytes = new BpmnXMLConverter().convertToXML(model);
  //发布流程
  String processName = modelData.getName() + ".bpmn20.xml";
  Deployment deployment = repositoryService.createDeployment()
      .name(modelData.getName())
      .addString(processName, new String(bpmnBytes, "UTF-8"))
      .deploy();
  modelData.setDeploymentId(deployment.getId());
  repositoryService.saveModel(modelData);
  return ResponseCode.ok();
}
origin: org.activiti/activiti-rest

model.setDeploymentId(modelRequest.getDeploymentId());
org.activiti.engine.repositoryModelsetDeploymentId

Popular methods of Model

  • setMetaInfo
  • setName
  • getId
  • getName
  • setKey
  • getMetaInfo
  • getCategory
  • getKey
  • setCategory
  • getTenantId
  • getVersion
  • setTenantId
  • getVersion,
  • setTenantId,
  • setVersion,
  • getCreateTime,
  • getDeploymentId,
  • getLastUpdateTime,
  • hasEditorSource,
  • hasEditorSourceExtra

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • setRequestProperty (URLConnection)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Collectors (java.util.stream)
  • JList (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now