Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Kai Respected Contributor.
Respected Contributor.
1035 views

Periodic workflows not getting started.

Jump to solution

Hi All,

We are facing an issue with periodic workflows which are supposed to run daily. These workflows have their context table set as ‘amWfScheme’. When I check the workflow instance table, there are no 'FINISHED' instances of any of these periodic workflows after 30th July 8 PM.

There were a few 'ACTIVE' instances in the amWfInstance table for these workflows, I removed them and restarted the APM hoping that'd work. It didn't make any difference.

Things that I have checked -

1. The schedule in parameter tab and execution group in APM are exactly the same. It runs daily from 8 AM-9AM.

2. Changed the execution group, logged into APM GUI using service mode and updated the new execution group to mimic the same schedule. This didn't start the workflows either.

3. I've changed the triggering condition and make it a database workflow instead of a Periodic (Log event and Process immediately – bypassing the APM), then modified the field on which Post-update was set to check if the script is getting triggered. It got triggered as usual.

4. I have also re-created one of the workflows from scratch and re-started the APM. Still it's not working.

I am not sure if I am missing a setting somewhere or there is some sort of corruption. We have 7 periodic workflows which have all stopped working after 30th July 8 PM. They were running fine for the past few years.

Please let me know if anything else can be tested, or some ideas to get this working.

Thanks in advance.

0 Likes
1 Solution

Accepted Solutions
Acclaimed Contributor.. Mark Cullen_1 Acclaimed Contributor..
Acclaimed Contributor..

Re: Periodic workflows not getting started.

Jump to solution

Based on your screenshot it looks as though the scheduled tasks are not really activated / enabled even though you state they are.  It is also odd there is an APM log file property set but no actual log file in that location.

Are you sure nothing has changed from an operating system security account?

You won't like the following, however, I know of no other way but to re-create the amsrv.cfg which means re-create all the scheduled tasks from scratch as the APM initially defaults each scheduled task schedule as every ten minutes...

1 - Stop the APM windows service.

2 - Backup1 and then delete "C:\Program Files (x86)\HP\Asset Manager 9.50 en\amsrv\amsrv.cfg"

3 - Open and log into APM GUI - DO NOT check "use in service mode" - this should re-create amsrv.cfg when you log off

4 - Wait for the GUI to display messages regarding all the execution groups

5 - Select1 'Tools > Main options...' menubar and setup log file parameters

6 - Select1 'Tools > Configure modules...' menubar and enable configure matching scheduled task schedule

7 - Disconnect from database and close APM GUI

8 - Start windows APM service

1 - If you have a file compare utility then ignore 5-6 and use with Backup amsrv.cfg to repopulate new amsrv.cfg

0 Likes
12 Replies
GoldenRatioRJP Honored Contributor.
Honored Contributor.

Re: Periodic workflows not getting started.

Jump to solution

Targeting a Periodic Workflow on the amWfScheme table is an old trick for when they records to be acted on are selected on the Script Action which the WF runs.  It gives you a nice safe way to have a unique record to trigger against.  Generally this is done using an Activation Condition on the Start Event and it looks something like this:

Ref = 'WF_REF_XXXXXXXX'

...where 'WF_REF_XXXXXXXX' is the Workflow Reference of the Workflow in question.

So check the Workflow Refernce and the Activation Condition and be sure they match.  Perhaps the Reference was updated, but the Condition was not?

I hope that helps... Russ

Russell Parker, CITAM, CHAMP, CSAM
President - Golden Ratio, Inc.
Russ.Parker@GoldenRatioInc.com
Acclaimed Contributor.. Mark Cullen_1 Acclaimed Contributor..
Acclaimed Contributor..

Re: Periodic workflows not getting started.

Jump to solution

Russell is spot on; and this is still a great old trick I use to this day.  Hopefully you are keeping an APM log which can be viewed to determine whether scheduled tasks are executing/erroring.  Obviously whenever logging into the APM GUI you should be using the same bAdminRight login and checked "run in service mode".  I am assuming the following...

1 - all relevant sheduled tasks are still enabled

2 - AM still has administrative rights on server

3 - Database owner is still valid with proper rights

4 - APM is executing as "Run as administrator" mode / UAC has not been altered

0 Likes
Acclaimed Contributor.. Mark Cullen_1 Acclaimed Contributor..
Acclaimed Contributor..

Re: Periodic workflows not getting started.

Jump to solution

5 - access to "C:\Users\.....\AppData\Roaming\HP\AssetManager\conf" for amsrv.ini is still valid and the file contents are still current with "LastCheck" entries under [Options] section.

Of course, all this seems odd to mention since you have not received a database lock / not communicated more than an hour message since the "signal presence" scheduled task is definitely executing.

0 Likes
Acclaimed Contributor.. Mark Cullen_1 Acclaimed Contributor..
Acclaimed Contributor..

Re: Periodic workflows not getting started.

Jump to solution

OH MY GOSH!!!  Please tell us someone checked the "Do not save instances in the database" attribute under General tab of workflow scheme table?

0 Likes
Acclaimed Contributor.. Mark Cullen_1 Acclaimed Contributor..
Acclaimed Contributor..

Re: Periodic workflows not getting started.

Jump to solution

FYI, your bullet 3, Log event and Process immediately DOES NOT bypass the APM.  There is an APM background agent that processes all workflow instances regardless.  It does this via 'Elementary event of workflow instance (amWfOccurEvent)' with 'Status (seStatus)' having one of the following:  To process|-1|Server processed|0|Immediately processed|1

0 Likes
Kai Respected Contributor.
Respected Contributor.

Re: Periodic workflows not getting started.

Jump to solution

Hi Mark & Russell,

The activation condition under Start event is referring to the workflow in question. So that one is okay.

All the 5 points mentioned by Mark checks out as well. The last check entries are recent. And the "Do not save instances.." checkbox is unchecked for this workflow.

Regarding APM logs, I can see the logs being generated while logged into the APM GUI using the service account(we run the APM as a service, using a service account), but nothing is being written to the log files while it's running as a service. I've attached a screenshot of the log file which was generated while I logged into the APM GUI.

Also, this is how our amsrv.cfg looks -

{ General
  LogFile="E:\\HP\\Data\\Logs\\AMDBA\\hpamp_amdba.log"
  LogFileSize=10240
  TimeSpanReconnectBase=5m
  TimeSpanReconnectMail=5m
  CheckDbServerTimeZone=0
}

 

0 Likes
Acclaimed Contributor.. Mark Cullen_1 Acclaimed Contributor..
Acclaimed Contributor..

Re: Periodic workflows not getting started.

Jump to solution

Based on your screenshot it looks as though the scheduled tasks are not really activated / enabled even though you state they are.  It is also odd there is an APM log file property set but no actual log file in that location.

Are you sure nothing has changed from an operating system security account?

You won't like the following, however, I know of no other way but to re-create the amsrv.cfg which means re-create all the scheduled tasks from scratch as the APM initially defaults each scheduled task schedule as every ten minutes...

1 - Stop the APM windows service.

2 - Backup1 and then delete "C:\Program Files (x86)\HP\Asset Manager 9.50 en\amsrv\amsrv.cfg"

3 - Open and log into APM GUI - DO NOT check "use in service mode" - this should re-create amsrv.cfg when you log off

4 - Wait for the GUI to display messages regarding all the execution groups

5 - Select1 'Tools > Main options...' menubar and setup log file parameters

6 - Select1 'Tools > Configure modules...' menubar and enable configure matching scheduled task schedule

7 - Disconnect from database and close APM GUI

8 - Start windows APM service

1 - If you have a file compare utility then ignore 5-6 and use with Backup amsrv.cfg to repopulate new amsrv.cfg

0 Likes
Kai Respected Contributor.
Respected Contributor.

Re: Periodic workflows not getting started.

Jump to solution

I can double check the service account and make sure that's alright.

This is the execution group we're using -

{ WorkflowFinder WkGroupTEST_WF
  Active=1
  UserData=
  { Plan
*/*/* = PERIOD/7200/0/06:00-08:00
  }

The log file is present in that location, but I can only see the entries in that file when I log in to the GUI manually. Not when the APM is running as a service.

Thanks for the steps as well, I am planning to run "Diagnostic/repair database" from App designer as well. We tried to install the SAM SLO package at that point of time, but we pulled the plug on that one since it was taking too long. If nothing comes out of this, I will have to re-create like you said.

Thank you.

0 Likes
Acclaimed Contributor.. Mark Cullen_1 Acclaimed Contributor..
Acclaimed Contributor..

Re: Periodic workflows not getting started.

Jump to solution

You can open the actual log file in NotePad even with the windows service executing.  You do not need to have GUI open to see the log file contents.

Opening the log file will be at that point in time which means any APM service processing after that time will not display in the log file until you close the log file then open it back up.

0 Likes
Acclaimed Contributor.. Mark Cullen_1 Acclaimed Contributor..
Acclaimed Contributor..

Re: Periodic workflows not getting started.

Jump to solution

All scheduled tasks (ie. execution groups) should have an entry in the log file whenever they are executed.  This means you should see log entry date-time stamp with "WkGroupTEST_WF" along with the oob entries (ie. signal presence, etc.).

0 Likes
Highlighted
GoldenRatioRJP Honored Contributor.
Honored Contributor.

Re: Periodic workflows not getting started.

Jump to solution

I recommend you not open the Log file while it is active.  Make a copy of it and use that one.  If you view the active log file it would sometimes create a locking issue and updates will stop getting written.

Russell Parker, CITAM, CHAMP, CSAM
President - Golden Ratio, Inc.
Russ.Parker@GoldenRatioInc.com
0 Likes
Kai Respected Contributor.
Respected Contributor.

Re: Periodic workflows not getting started.

Jump to solution

Hi Mark & Russell,

It seems to be an issue with the service account we are using. Some compliance requirement on the client side will prohibit supplying service account credentials in a “run as” command on a workstation..

When I logged into the APM GUI using the Admin account, all the workflows were executed as expected with proper entries in the log files.

Thanks a lot for your responses.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.