cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow Integration for Backoffice?

Former Member
0 Kudos

Hey guys,

I have created a simple workflow, which will get triggered by creating or updating any product (there are enough sample impex for this case and since it´s working in general, I won´t provide it here). I have tested it i.e. for admincockpit - everything is fine there and will work as expected. (I have provided a activationScript for triggering it)

Now the customer wants to maintain products in backoffice. So I have tried to trigger the workflow via editing and creating a new product in backoffice. My problem is very easy : Nothing will happen. No workflow will get triggered. I have several breakpoints at locations, where he should get into, but also there : no results. (i.E. scriptEvaluationService)

Is there any implementation for triggering workfows via activation script in backoffice at all? Or may there be a configuration property to enable it?

Note that I have tested the same for HMC, where it will not work completly. Workflow is created, but stucks at the very first step, which is a automatically one - the jobhandler won´t get called and status is 'PENDING'...

Thanks and greetings

Dmitrij

Former Member
0 Kudos

Hi

Which version of platform do you have?

Best Regards,

Former Member
0 Kudos

I am using hybris 5.7

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Is there any implementation for triggering workfows via activation script in backoffice at all?

Unfortunately, but in the Backoffice support for trigger script (and full support for workflow) will be introduced in version 6.2 hybris platform ... So, you could write your own code to start workflow (for example, you could write new createAction for adding product ... and there write your code to trigger the workflow)

Note that I have tested the same for HMC, where it will not work completly. Workflow is created, but stucks at the very first step, which is a automatically one - the jobhandler won´t get called and status is 'PENDING'

You should log to admincockpit (http://localhost:9001/admincockpit/index.zul) with same credential as you set for workflow and you will find there task generated by workflow ... You should finish that task, after that workflow will move forward ...

Best Regards,

Former Member
0 Kudos

Thanks for information.

Former Member
0 Kudos

Implementing a new CreateAction is fine if the workflow has to be created/triggered in case of entity creation only. In our case a workflow also should get created/triggered when a attribute of an existing entity was changed. As far as i know, there is no easy way to hook into the save operation in backoffice... Any suggestions?

Regards, Norbert

Former Member
0 Kudos

Hi

1) You could use interceptor read this. So, for example implement ValidateInterceptor#onValidate or PrepareInterceptor#onPrepare, there you could check modification on attribute by call InterceptorContext.isModified(Object model, String attribute) and if method will return true you could trigger creation of workflow. 2) You could use AfterSaveListener read this.

Best Regards,

Former Member
0 Kudos

Hi Marek,

thanks for your reply.

@Interceptors Assume i have to trigger the workflow on product creation. If i would trigger the workflow in Validate/PrepareInterceptor, i would create and trigger a workflow for a product that isn't yet saved in database. When saving the workflow, the related product gets saved again - and again the Validate/PrepareInterceptor is being called.

@AfterSaveListener Assume i have to trigger the workflow under certain conditions (e.g. a certain attribute changed). With AfterSaveListener i have no context like InterceptorContext containing this information.

Answers (0)