cancel
Showing results for 
Search instead for 
Did you mean: 

BpmnDeployer - 'incorrect' resourceName.

gwt_inter
Champ in-the-making
Champ in-the-making
Hi All,

please consider to add WARN message to org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.

To be more concrete (version 5.7, line 65-…):

…  
if (resourceName.endsWith(BPMN_RESOURCE_SUFFIX)) {
        ResourceEntity resource = resources.get(resourceName);
        byte[] bytes = resource.getBytes();
        ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes);

}
else {
   LOG.warn("You need to provide resource name that ends with  " + BPMN_RESOURCE_SUFFIX + " Resource " + resourceName + " is not processed.");
}
       

Or at least think about update of javaDoc at org.activiti.engine.repository.DeploymentBuilder.addInputStream(String, InputStream).

You can save quite a lot of time (I believe) to many activiti users (http://forums.activiti.org/en/search.php?keywords=addInputStream).

Thanks.
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
You can add any resources you want (.form, .png, …), that's why it's not documented in the javadoc AND no warning is logged in the BPMN-parser since it gets all resources thrown at him.


The userguide alse states this (http://www.activiti.org/userguide/index.html#N106B0😞
When a business archive is deployed, it is scanned for BPMN files with a .bpmn20.xml extension. Each of those will be parsed and potentially contains multiple process definitions.

gwt_inter
Champ in-the-making
Champ in-the-making
Thanks for your reply.

Use Case:

* I want to deploy BMPN definition file.

** I put "myProcessDefinition" as a resourceName argument.
** I provide some.xml file as an InputStream.

* Result:
Nothing is deployed, no warning, no error.

I get why it is like that.

It just makes no sense to me that BpmnDeployer deploys any resource so it is clear that it can't "scream" that there is
something wrong with resource name.

Maybe it will be good to split BmpnDeployer to real BpmnDeployer definition and BpmnDeployer resource.
Or something "above" deployer (?) in case of zipped bundles.

Thanks

jbarrez
Star Contributor
Star Contributor
The thing that Frederik is trying to make clear: what if you actually want to upload xml files (eg a custom form).
The BPMNDeployer cant guess whether it should warn or not.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.