cancel
Showing results for 
Search instead for 
Did you mean: 

Create business rule task in alfresco workflow

seif
Confirmed Champ
Confirmed Champ

Hello everybody,

I want to create a business rule task in my alfresco workflow (not standalone activiti). The first question: is that possible?

I try to do that but when the workflow arrive to the business rule task this error is shown:

org.activiti.engine.ActivitiException: deployment 23701 doesn't contain any rules.

Thanks.

11 REPLIES 11

ycoulon
Employee
Employee

Hi,

IMO this should be possible.

To answer the question, we need some information about your project and his structure to be able to troubleshoot the error.

Yann

seif
Confirmed Champ
Confirmed Champ

Hi, 

Thank you for your quick response. I want to remake the same model in this activiti project in an AMP project without Junit of course.

Hi,

In an AMP ? you mean for Alfresco ?

In order to get rid of that ActivitiException, you will need to create a deployment containing the drool rule.

In your zip file the JUnit test do it with the following line :

String deploymentID = repositoryService.createDeployment().name("BusinessRuleLoanProcess.bar")
      .addZipInputStream(inputStream).deploy().getId();

But there is nothing that do the same in your non-test code.

Yann

seif
Confirmed Champ
Confirmed Champ

Yes, i mean Alfresco.

How to add the drool rule to the process (we have not activiti.cfg.xml in Alfresco).

Activiti embeded in Alfresco work the same way as the standalone one.

But I think you should take a look at the version embedded with your Alfresco.

You can grab the version in the jar name located in alfresco/WEB-INF/lib folder.

So you have to generate the bar file using your activiti project (the zip you attach to the case) and put that file in your AMP project.

Then you could deploy it to the engine using the code in my last comment. You will need to call that piece of code at startup.

You could look at the alfresco SDK sample : alfresco-sdk-samples/samples/alfresco-simple-module/repo at master · Alfresco/alfresco-sdk-samples ·...  

Hi Seif _‌,

Alfresco got an activiti.cfg.xml equivalent in it's core (community-edition/activiti-context.xml at 2c1eff9953d3105e738f7b06ba9ba8a079ca4c24 · Alfresco/commun... )

I checked the code available on github (GitHub - Alfresco/community-edition: Mirror of Alfresco Community Edition (see https://wiki.alfresco... ) and didn't find anything related to the RulesDeployer.

So I'm not sure that activiti feature is available in Alfresco.

Maybe Francesco Corti‌ got some informations about that.

Yann

fcorti
Elite Collaborator
Elite Collaborator

Hi Yann Coulon‌, Hi Seif _‌,

The answer is that there is no business rule component for Alfresco Workflow.

I hope this helps.

Hi ,

Thanks for your answer.

fcorti
Elite Collaborator
Elite Collaborator

You are welcome.
Feel free to ask. 😉