601,100
562,"NULL"
586,
585,
564,
565,"hdlITYA=aXVZ0>^Uf9^=h95`T[?@`mW@^D@dP1qeGChysxRHEG^t7rOzUyu44xJl@N209kEc1Lwprgy]sfWi2XKu^Ei>BVa\rTR;[AlP@TDNto7c=\gHQNj1xKdMbbhfxP6f\lY=>;q[i@pyQ32[UQ^I;1cP@6vjuNVyhqFvXOhlwCWf\:;au\xNR\bkOj0^47p]Uz]>"
559,0
593,
594,
595,
597,
598,
596,
800,
801,
566,0
567,","
588,"."
589,
568,""""
570,
571,
569,0
592,0
599,1000
560,2
pPlan
pVersion
561,2
2
2
590,2
pPlan,""
pVersion,""
637,2
pPlan,Plan (Blank for All)
pVersion,Version (Blank for ALL)
577,0
578,0
579,0
580,0
581,0
582,0
572,133

#****GENERATED STATEMENTS START****
#****GENERATED STATEMENTS FINISH****

vObjectPrefix = attrs('}sm_controls', 'subman_object_prefix', 'value');
vObjectSeparator = attrs('}sm_controls', 'subman_object_separator', 'value');

vPlanDim = vObjectPrefix  | 'sm_plans';
vClientsDim = '}Clients';
vMeasure = 'Count';
vOwnerMeasure = 'Owner Count';
vTaskStatusDim = vObjectPrefix  | 'sm_task_status';
vTaskActionDim = vObjectPrefix  | 'sm_task_action';
vTaskStatusActionCube = vObjectPrefix  | 'sm_task_status_action';
vTaskStatusActionMeasure = 'New Action';
vTaskTypeComplete = 'Complete';
vTaskTypeDelegate = 'Delegate';
vTaskRoleOwner = 'Owner';
vTaskRoleDelegator = 'Delegator';

vTaskStatusCount = DIMSIZ(vTaskStatusDim);
vTaskActionCount = DIMSIZ(vTaskActionDim);
vClientCount = DIMSIZ( vClientsDim );


vPlanIndex = 1;
vPlanCount = DIMSIZ(vPlanDim);
while (vPlanIndex <= vPlanCount & (pPlan @= '' % vPlanIndex = 1));
if (pPlan @<> '');
vPlan = pPlan;
else;
vPlan = DIMNM(vPlanDim, vPlanIndex);
endif;

vCube = vObjectPrefix  | 'sm_versiontaskstatuses' | vObjectSeparator | vPlan;
vVersionDim = vObjectPrefix  | 'sm_versions' | vObjectSeparator | vPlan;

vCubeIX = DIMIX('}Cubes',  vCube);
if (vCubeIX = 0); 
cubecreate( vCube, vClientsDim,  vVersionDim, '}sm_task_status', '}sm_version_task_status_measures');
endif;

vVersionIndex = 1;
vVersionCount = DIMSIZ(vVersionDim);
while (vVersionIndex <= vVersionCount & (pVersion @= '' % vVersionIndex = 1));
if (pVersion @<> '');
vVersion = pVersion;
else;
vVersion = DIMNM(vVersionDim, vVersionIndex);
endif;

vClientIndex = 1;
while (vClientIndex <= vClientCount);
vClient = DIMNM(vClientsDim, vClientIndex);
vTaskStatusIndex = 1;
while (vTaskStatusIndex <= vTaskStatusCount);
vTaskStatus = DIMNM(vTaskStatusDim, vTaskStatusIndex);
if (ELLEV(vTaskStatusDim, vTaskStatus) = 0);
CellPutN(0, vCube, vClient, vVersion, vTaskStatus, vMeasure);
CellPutN(0, vCube, vClient, vVersion, vTaskStatus, vOwnerMeasure);
endif;
vTaskStatusIndex = vTaskStatusIndex + 1;
end;
vClientIndex = vClientIndex + 1;
end;

vTaskDim = vObjectPrefix  | 'sm_versiontasks' | vObjectSeparator | vPlan | vObjectSeparator | vVersion;

vTaskIndex = 1;
vTaskCount = DIMSIZ(vTaskDim);
while (vTaskIndex <= vTaskCount);
vTask = DIMNM(vTaskDim, vTaskIndex);

vTaskStatusValue = ATTRS(vTaskDim, vTask, 'Status');
vTaskOwner = ATTRS(vTaskDim, vTask, 'Owner');

if (ELLEV(vTaskStatusDim, vTaskStatusValue) = 0 & vTaskStatusValue @<> '' &
vTaskOwner @<> '' & vVersion @<> '' & vOwnerMeasure @<> '');
CellPutN(1 + CellGetN(vCube, vTaskOwner , vVersion, vTaskStatusValue, vOwnerMeasure), vCube, vTaskOwner , vVersion, vTaskStatusValue, vOwnerMeasure);
endif;

vUpdateOwner = vTaskOwner;

if (vTaskStatusValue @<> '' & vTaskOwner @<> '');
vTaskType = vTaskTypeComplete;
if (ELPARN(vTaskDim, vTask) > 0);
vParentOwner = ATTRS(vTaskDim, ELPAR(vTaskDim, vTask, 1), 'Owner');
if (vParentOwner @<> vTaskOwner);

vTaskActionIndex = 1;
vNextStatus = '';
while (vTaskActionIndex <= vTaskActionCount & vNextStatus @= '');
vTaskAction = DIMNM(vTaskActionDim, vTaskActionIndex);
if (vTaskAction @<> 'REVOKE');
vNextStatus = CellGetS(vTaskStatusActionCube, vTaskRoleOwner, vTaskAction, vTaskStatusValue, vTaskTypeDelegate, vTaskStatusActionMeasure);
endif;

vTaskActionIndex = vTaskActionIndex + 1;
end;

if (vNextStatus @= '');
vUpdateOwner = vParentOwner;
endif;

endif;
endif;

vTaskStatusIndex = 1;
while (vTaskStatusIndex <= vTaskStatusCount);
vTaskStatus = DIMNM(vTaskStatusDim, vTaskStatusIndex);
vTaskStatusAlias = ATTRS(vTaskStatusDim, vTaskStatus, 'Status');
if (vTaskStatusAlias @= '');
vTaskStatusAlias = vTaskStatus;
endif;

if (ELLEV(vTaskStatusDim, vTaskStatus) = 0 & vTaskStatusAlias @= vTaskStatusValue);
CellPutN(1 + CellGetN(vCube, vUpdateOwner , vVersion, vTaskStatus, vMeasure), vCube, vUpdateOwner , vVersion, vTaskStatus, vMeasure);

vTaskStatusIndex = vTaskStatusCount + 1;
else;
vTaskStatusIndex = vTaskStatusIndex + 1;
endif;
end;
endif;

vTaskIndex = vTaskIndex + 1;
end;

vVersionIndex = vVersionIndex + 1;
end;

vPlanIndex = vPlanIndex + 1;
end;
573,3

#****GENERATED STATEMENTS START****
#****GENERATED STATEMENTS FINISH****
574,3

#****GENERATED STATEMENTS START****
#****GENERATED STATEMENTS FINISH****
575,5

#****GENERATED STATEMENTS START****
#****GENERATED STATEMENTS FINISH****

EXECUTEPROCESS('pm_task_statistics_cube');
576,CubeAction=1511	DataAction=1503	CubeLogChanges=0	
638,1
804,0
900,
901,
902,
903,
906,
907,
908,
904,0
905,0
909,0
910,0
911,
912,
913,
914,
915,
916,
