Sha256: 38e52a648d2d99a171093345504805e699e6c77c45d5f618066456c4fbe59d47

Contents?: true

Size: 1.15 KB

Versions: 3

Compression:

Stored size: 1.15 KB

Contents

require 'test_helper'

class ProcessDiagramTest < Minitest::Test
  def test_definition_diagram
    diagramer = org.jrubyactiviti.ProcessDiagram.new(
      Activiti::RuntimeService,
      Activiti::RepositoryService,
      Activiti::HistoryService)

    Activiti::RepositoryService.createDeployment().
      addClasspathResource("test/resources/VacationRequest.bpmn20.xml").
      deploy()
    Activiti::RuntimeService.startProcessInstanceByKey("vacationRequest", {});

    pdid = Activiti::RuntimeService.createProcessInstanceQuery().list().first().getProcessDefinitionId()
    assert diagramer.getDiagramNode(nil, pdid)
  end

  def test_instance_diagram
    diagramer = org.jrubyactiviti.ProcessDiagram.new(
      Activiti::RuntimeService,
      Activiti::RepositoryService,
      Activiti::HistoryService)

    Activiti::RepositoryService.createDeployment().
      addClasspathResource("test/resources/VacationRequest.bpmn20.xml").
      deploy()
    Activiti::RuntimeService.startProcessInstanceByKey("vacationRequest", {});

    instance = Activiti::RuntimeService.createProcessInstanceQuery().list().first()
    assert diagramer.getDiagramNode(instance.getId(), nil)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jruby_activiti-2.0.8 test/process_diagram_test.rb
jruby_activiti-2.0.7 test/process_diagram_test.rb
jruby_activiti-2.0.6 test/process_diagram_test.rb