Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

StatusCode values for web service call?

Avatar

Level 2

I am trying to check the status of a long-lived service using a web service call from a .NET application. I therefore don't have access to the java libraries where the StatusCode constants (enumerations?) are defined. Can someone either tell me a .NET library I can reference in order to use the constant values, or at least tell me what the integer values are, and I can make my own constants.

In case it wasn't cIear, I am using webservice_invokeStatus( jobId ).

Thanks,

Mike Gates

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Hi Mike,

Good news!!! I figured out what's happening.

The codes that I posted were related to the Process. They are process status codes.

What you are looking for is related to the Job. So here are the job status codes.

JOB_STATUS_UNKNOWN = 0 (default)
JOB_STATUS_QUEUED = 1
JOB_STATUS_RUNNING=2
JOB_STATUS_COMPLETED=3
JOB_STATUS_FAILED=4
JOB_STATUS_TERMINATED=5
JOB_STATUS_SUSPENDED=6
JOB_STATUS_COMPLETE_REQUESTED=7
JOB_STATUS_TERMINATE_REQUESTED=8
JOB_STATUS_SUSPEND_REQUESTED=9
JOB_STATUS_RESUME_REQUESTED=10

cheers,

Parth

View solution in original post

6 Replies

Avatar

Former Community Member

Hi Mike,

These are the values that you need to know about the process statuses.

PROCESS_INSTANCE_INITIATED = 0;
PROCESS_INSTANCE_RUNNING = 1;
PROCESS_INSTANCE_COMPLETE = 2;
PROCESS_INSTANCE_COMPLETING = 3;
PROCESS_INSTANCE_SUSPENDED = 6;
PROCESS_INSTANCE_SUSPENDING = 7;
PROCESS_INSTANCE_UNSUSPENDING = 8;
PROCESS_INSTANCE_TERMINATED = 4;
PROCESS_INSTANCE_TERMINATING = 5;

hope it helps.

Parth Pandya

http://blog.pandyaparth.com

Avatar

Level 2

Hmmm....while my process is running, I am getting statuscode values of "2". Could there be different values coming out of the web service?

Avatar

Former Community Member

Could you check what the value is for the process that actually has completed?

Avatar

Level 2

I get a "3" when it has completed.

Avatar

Correct answer by
Former Community Member

Hi Mike,

Good news!!! I figured out what's happening.

The codes that I posted were related to the Process. They are process status codes.

What you are looking for is related to the Job. So here are the job status codes.

JOB_STATUS_UNKNOWN = 0 (default)
JOB_STATUS_QUEUED = 1
JOB_STATUS_RUNNING=2
JOB_STATUS_COMPLETED=3
JOB_STATUS_FAILED=4
JOB_STATUS_TERMINATED=5
JOB_STATUS_SUSPENDED=6
JOB_STATUS_COMPLETE_REQUESTED=7
JOB_STATUS_TERMINATE_REQUESTED=8
JOB_STATUS_SUSPEND_REQUESTED=9
JOB_STATUS_RESUME_REQUESTED=10

cheers,

Parth

Avatar

Level 2

Thats exactly what I needed, Parth. Thanks!

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----