Extended Property for Tasks

This commit is contained in:
Hugo Loza
2011-01-18 22:14:46 +00:00
parent 8b3663df5f
commit 324bb69a6a
4 changed files with 112 additions and 5 deletions

View File

@@ -354,6 +354,16 @@ class processMap {
$oDataset->next();
}
$oPM->derivation = array('Sequential', 'Evaluate (manual)', 'Evaluate (auto)', 'Parallel (fork)', 'Parallel by evaluation (fork)', 'Parallel (sequential join)', 'Parallel (sequential main join)');
//Load extended task properties from plugin. By JHL Jan 18, 2011
$oPluginRegistry =& PMPluginRegistry::getSingleton();
$activePluginsForTaskProperties=$oPluginRegistry->getTaskExtendedProperties();
$oPM->taskOptions = array();
foreach($activePluginsForTaskProperties as $key => $taskPropertiesInfo){
$taskOption['title']=$taskPropertiesInfo->sName;
$taskOption['id']=$taskPropertiesInfo->sNamespace."--".$taskPropertiesInfo->sName;
$oPM->taskOptions[]=$taskOption;
}
$oJSON = new Services_JSON ( );
return $oJSON->encode($oPM);
@@ -1293,6 +1303,21 @@ class processMap {
case 7 :
$sFilename = 'tasks/tasks_Notifications.xml';
break;
default:
print "<h1>$iForm</h1>";
//if the $iForm is not one of the defaults then search under Plugins for an extended property. By JHL Jan 18, 2011
$oPluginRegistry =& PMPluginRegistry::getSingleton();
$activePluginsForTaskProperties=$oPluginRegistry->getTaskExtendedProperties();
$oPM->taskOptions = array();
foreach($activePluginsForTaskProperties as $key => $taskPropertiesInfo){
$id=$taskPropertiesInfo->sNamespace."--".$taskPropertiesInfo->sName;
if($id==$iForm){
$sFilename=$taskPropertiesInfo->sPage;
}
}
//$sFilename = 'tasks/tasks_Owner.xml';
break;
}
$oTask = new Task ( );
$aFields = $oTask->load($sTaskUID);