Jump to content

Using BPM template breaks the "next stage" node from the previous stage


Recommended Posts

Hello,

On the evening of Friday 15th June (omg this date could be a reason for this issue), @Aaron Summers and I worked through every single active Business Process in Hornbill replacing all the existing "Closure" stages with a new version, which we saved as a template prior to doing the work.

All the BPM's were amended, and saved without any problems at all (No errors)

Come the following week we started to get reports of issues where any new calls raised after we did the work, were failing to get to the closure stage, but when looking at the BPM's... everything was fine. Then I suddenly remembered an SQL script that I could use to identify any errors and pull out the BPM ID:

SELECT 
    h_bpm_id BPM_ID, 
    h_bpm_instance.h_name BPM_NAME,
    h_pk_reference REQUEST_REF, 
    h_datelogged LOGGED_DATE,
    h_fk_servicename SERVICE,
    h_catalog CATALOG,
    h_status STATUS,
    CONCAT('https://admin.hornbill.com/<instance>/app/com.hornbill.servicemanager/workflow/bpm/!',h_bpm_id)  BPM_URL
FROM 
    h_itsm_requests
JOIN 
    h_bpm_instance ON h_bpm_instance.h_id = h_itsm_requests.h_bpm_id
WHERE 
    (
        h_bpm_instance.h_state LIKE '%"status":"failed"%'
    or
        h_bpm_instance.h_state LIKE '%<error>%'
    )
AND
    h_status not in ('status.closed','status.cancelled')
order by 
    h_datelogged desc

Using the above we were able to pinpoint what was going wrong... it isn't very clear but from my knowledge, when the "Next Stage" node is blank, usually it should just go to the next stage after the current one....right?

Well ALL the "Next Stage" nodes on resolution stage were all blank (which is what I think it should be), but every ticket was flagging up an error here... so it seems that using the new Stage Template functionality has not correctly updated the entire Business Process (all of them) to identify that it is in fact the next stage of the process.

@Aaron Summers and I have had to go through every single Next Stage node, in every Resolution Stage in every Business Process again and manually point it to the new and improved "Closure" stage.

But we've had loads of requests raised since we "fixed" the issue, so we are both having to run the above SQL at regular intervals to manually fix each BPM instance (hence having the link generated for it in the SQL).

Just thought to let you know... since I don't think we can bulk resolve it for all requests using SQL... to prevent this issue from happening again in the future.

Thanks,

Samuel Wood

(To add we did test the new Closure stage and it worked at the time, we are not sure what we did differently)

Link to comment
Share on other sites

39 minutes ago, samwoo said:

when the "Next Stage" node is blank, usually it should just go to the next stage after the current one....right?

Yes and no ... every "Next Stage"  node will have a reference pointing to the next stage... even if this reference is not necessarily visible in node configuration it will exist in BP configuration record... so if a stage is changed the current reference for that stage becomes invalid...

Link to comment
Share on other sites

2 minutes ago, Victor said:

Yes and no ... every "Next Stage"  node will have a reference pointing to the next stage... even if this reference is not necessarily visible in node configuration it will exist in BP configuration record... so if a stage is changed the current reference for that stage becomes invalid...

Ah I see, it's a shame it didn't flag up as an error when we first worked on it :( Could I request for there to be a validation to check and confirm that the referenced stage is active and available otherwise to throw an error if not?

Link to comment
Share on other sites

30 minutes ago, samwoo said:

Could I request for there to be a validation to check and confirm that the referenced stage is active and available otherwise to throw an error if not?

I'll raise this internally...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...