EssGetProcessState() gets the current state of an asynchronous process, such as a calculate or a data import.
ESS_FUNC_M EssGetProcessState (hCtx, pProcState);
| ESS_HCTX_T | hCtx |
| ESS_PPROCSTATE_T | pProcState |
| hCtx | Essbase API context handle. |
| pProcState | Pointer to process state structure |
If successful, returns the current process state in the state
structure pProcState. Values for pProcState:
ESS_STATE_DONE: 0 = Done
ESS_STATE_INPROGRESS: 1 = In progress
ESS_STATE_FINALSTAGE: 5 = In final stage; cannot be canceled
This function requires no special privilege.
ESS_FUNC_M
ESS_RunCalc (ESS_HCTX_T hCtx)
{
ESS_FUNC_M sts = ESS_STS_NOERR;
ESS_SHORT_T isResponse;
ESS_HCTX_T hSrcCtx;
ESS_BOOL_T isObject = ESS_FALSE;
ESS_STR_T AppName;
ESS_STR_T DbName;
ESS_STR_T FileName;
ESS_PROCSTATE_T pState;
hSrcCtx = hCtx;
AppName = "Sample";
DbName = "Basic";
FileName = "Test";
sts = EssCalcFile (hCtx, hSrcCtx, AppName,
DbName, FileName, ESS_TRUE);
if (!sts)
{
sts = EssGetProcessState (hCtx, &pState);
while(!sts || (pState.State !=
ESS_STATE_DONE))
sts = EssGetProcessState (hCtx, &pState);
}
return(sts);
}