Thursday, July 13, 2023

adding new node in hierarcy type in workflow



class: WorkflowHierarchyProviderHelper  for convert nodetype 


[ExtensionOf(classstr(WorkflowHierarchyProviderHelper))]

public  final class testWorkflowHierarchyProviderHelper_Extension

{

    public anytype convertToNodeDataType(extendedDataTypeName _dataType, anytype _value, WorkflowContext _workflowContext)

    {

        HcmPersonnelNumberId    personnelNumberId;


        const extendedDataTypeName ProjResponsibleFinancialWorker = 'ProjResponsibleFinancialWorker';

        const extendedDataTypeName PurchReqPreparerRefRecId       = 'PurchReqPreparerRefRecId';


        if (_dataType == ProjResponsibleFinancialWorker)

        {

            _dataType = PurchReqPreparerRefRecId;

        }


        personnelNumberId = next convertToNodeDataType(_dataType, _value, _workflowContext);


        if (_dataType == ProjResponsibleFinancialWorker)

        {

            _dataType = ProjResponsibleFinancialWorker;

        }


        return personnelNumberId;

    }


}

class: WorkflowHierarchyProviderHelperEventHandler for adding node "Controller"



public final class TestWorkflowHierarchyProviderHelperEventHandler

{


    [SubscribesTo(classstr(WorkflowHierarchyProviderHelper), delegatestr(WorkflowHierarchyProviderHelper, addAdditonalSupportedDataTypesDelegate))]

    static void addAdditonalSupportedDataTypesDelegate(Set _supportedDataTypes)

    {

        _supportedDataTypes.add(extendedTypeStr(ProjResponsibleFinancialWorker));

    }


}

No comments:

Post a Comment

adding new node in hierarcy type in workflow

class: WorkflowHierarchyProviderHelper  for convert nodetype  [ExtensionOf(classstr(WorkflowHierarchyProviderHelper))] public  final class ...