Giter Site home page Giter Site logo

activiti-examples's Introduction

Activiti Core Examples

This repository contains Activiti Core Examples using the new ProcessRuntime and TaskRuntime APIs.

  • activiti-api-basic-process-example: simple example using the ProcessRuntime APIs only
  • activiti-api-basic-task-example: simple example using the TaskRuntime APIs only
  • activiti-api-basic-full-example: simple example combining ProcessRuntime and TaskRuntime APIs
  • activiti-api-spring-integration-example: simple example combining Spring Integration framework and the new ProcessRuntime APis

These examples are updated regularly to consume our frequent releases which can be found in our Alfresco Nexus Repository:

<repositories>
    <repository>
      <id>alfresco</id>
      <name>Activiti Releases</name>
      <url>https://artifacts.alfresco.com/nexus/content/repositories/activiti-releases/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
    </repository>
</repositories>

You can also take a look at our tags for more stable releases such as:

Which uses the Maven Artifacts published in Maven Central.

For cloud-based examples see https://github.com/Activiti/activiti-cloud-examples

activiti-examples's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

activiti-examples's Issues

Error while processing the app definition file

Hi,

I tried to import the loan-request-7-201711-EA.jar (renamed to .zip because APS requires this) but I get this error:

Error while processing the app definition file : Could not find app definition json loan-request-7-201711-EA.zip

/Jimmie

Is this example working?

I am getting the following exception when running mvn command:

at 96 kB/s)
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not find artifact org.activiti.dependencies:activiti-dependencies:pom:7.0.25 in central (https://repo.maven.apache.org/maven2) @ line 29, column 19
[ERROR] 'dependencies.dependency.version' for org.activiti:activiti-spring-boot-starter:jar is missing. @ line 45, column 17
@

maven unknow

I downloaded the project and imported it into idea. This problem has always occurred.
image

Deploy new process definition is not working

Starting with the activiti-api-web-example I'm trying to deploy e service definition exposing a REST endpoint. As here:

@PostMapping("/deploy-process-def")
    @Transactional
    public Deployment deployProcess() throws IOException {
    	try(InputStream is = this.getClass().getResourceAsStream("/categorize-text.bpmn20-runtime.xml")) {
           	Deployment d = repositoryService.createDeployment()
        	  .addInputStream("categorizeProcess", is)
        	  .deploy();
        	 System.out.println("Number of process definitions: " + repositoryService.createProcessDefinitionQuery().count());
        	 System.out.println("Size:" + processRuntime.processDefinitions(Pageable.of(0, 100)).getTotalItems());
        	return d;
    	}
    }

The REST endpoint return it as deployed :

{
    "id": "daca192d-bdc7-11e9-bf7a-02421da64f59",
    "tenantId": "",
    "resources": {
        "categorizeProcess": {
            "id": "daca192e-bdc7-11e9-bf7a-02421da64f59",
            "name": "categorizeProcess",
            "bytes": "PD94bWwgdm......4K",
            "deploymentId": "daca192d-bdc7-11e9-bf7a-02421da64f59",
            "generated": false,
            "persistentState": "org.activiti.engine.impl.persistence.entity.ResourceEntityImpl",
            "deleted": false,
            "inserted": true,
            "updated": false
        }
    },
    "deploymentTime": "2019-08-13T12:42:47.833+0000",
    "new": true,
    "persistentState": {
        "tenantId": ""
    },
    "deleted": false,
    "inserted": true,
    "updated": false
}

But in the sysout I always get ad output:

Number of process definitions: 0
Size:0

It seems it not see the new deployed defintion.
I tried, also calling the original endpoint

  @GetMapping("/process-definitions")
    public List<ProcessDefinition> getProcessDefinition(){
        return processRuntime.processDefinitions(Pageable.of(0, 100)).getContent();
    }

But I cannot see my definition as present.
I thought it was a cache related effect, so I added to my controller:

@PostConstruct
    void init() {    	processEngine.getProcessEngineConfiguration().setEnableProcessDefinitionInfoCache(false);
    	ProcessEngineConfigurationImpl impl = (ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration();
    	impl.setProcessDefinitionCacheLimit(0);
    }

But nothing changed.

Can anyone help me ?
Thanks

Error while on activity-api-basic-process-example startup

I'm just trying to run activity-api-basic-process-example but I got the following error:

Caused by: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 752; cvc-elt.1.a: Cannot find the declaration of element 'definitions'.
	at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
	at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
	at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2132)
	at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:829)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3060)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:836)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHelper.validate(StreamValidatorHelper.java:176)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:115)
	at java.xml/javax.xml.validation.Validator.validate(Validator.java:124)
	at org.activiti.bpmn.converter.BpmnXMLConverter.validateModel(BpmnXMLConverter.java:214)
	at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:269)

Any help will be appreciated.

Regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.