Steph89
Crownpeak employee

Delete Workflow - Delete Message through UX-Bridge

Jump to solution

In a delete workflow is it possible to create a script to send a delete message through the UX-Bridge module. Is there a standard way to do this like there is in a normal schedule for publishing?

in the schedule you can access the UXB-API service (see also chapter 4.4 of the developer documentation) there you can use the removeUxbEntry function to generate delete messages.

I did find the methods you have mentioned here but not sure quite how to apply it. The reason for that is from what I read I had to reference a schedule. This confused me as there wouldn't be a schedule due to it being a delete workflow. What I am trying to do is when a page is deleted I want it to go through a workflow and before the page is deleted a script is fired to send a UX-Bridge message containing the page ID/reference for the page I want to remove from my database. We have a listener/adapter that is subscribing to the JMS (ActiveMQ) and that would pick up this message and remove the document. I saw two methods in the UXB documentation to do this.

One method (I think the one you mentioned) was to call the UXB Service API but I am confused as to the concept of a schedule in this context. Plus looks like I need to wrote a module to install to get this to work. Also not sure how would a schedule would know about a deleted document and page reference. Maybe clearing this up for me would help me understand better how to apply this. I also saw some references here https://github.com/e-Spirit/uxbridge-samples that could be of help but again the mention of a schedule confuses me and how a schedule knows about a deleted document etc.

The other was an option in the docs I have under expansion options using the UxbMessageGenerator Interface but again not sure how to apply this without creating a module and installing it.

It may also help if I can get the latest documentation you have as that may be different. I am using the documentation as shown below and UXB version 1.6.4.

*I have provided the module version 1.7.0 to help resolve this request

0 Kudos
1 Solution

Accepted Solutions
tenter
I'm new here

Hi Stephanie,

sorry for the long waiting time. You already got the right track, you can find your answer here: uxbridge-samples/DeleteEntityExecutable.java at master · e-Spirit/uxbridge-samples · GitHub

In your workflow, you can trigger an executable. The executable could look like the example executable I linked to above. The executable takes the workflow entity, retrieves the UxbService and sends an appropriately assembled deletation message. There is some other stuff going on because you would want to handle incoming references and stuff, but you could simply copy the DeleteEntityExecutable class from the link. Also, the executable is included in the UX-Bridge module. You can find the documentation in chapter 4.4. It states that you can just place

#! executable-class

com.espirit.moddev.uxbridge.samples.workflow.DeleteEntityExecutable

into your script and it would work. Could you try this and give us feedback how it works out for you?

Regards,

Hannes

View solution in original post

0 Kudos
2 Replies
tenter
I'm new here

Hi Stephanie,

sorry for the long waiting time. You already got the right track, you can find your answer here: uxbridge-samples/DeleteEntityExecutable.java at master · e-Spirit/uxbridge-samples · GitHub

In your workflow, you can trigger an executable. The executable could look like the example executable I linked to above. The executable takes the workflow entity, retrieves the UxbService and sends an appropriately assembled deletation message. There is some other stuff going on because you would want to handle incoming references and stuff, but you could simply copy the DeleteEntityExecutable class from the link. Also, the executable is included in the UX-Bridge module. You can find the documentation in chapter 4.4. It states that you can just place

#! executable-class

com.espirit.moddev.uxbridge.samples.workflow.DeleteEntityExecutable

into your script and it would work. Could you try this and give us feedback how it works out for you?

Regards,

Hannes

0 Kudos
thmarx
I'm new here

Hi Stephanie,

I think chapter Workflow coupling of the developer documentation is what you are looking for. There is an example for a delete workflow.

Regards

Thorsten

0 Kudos