Skip to main content
Question

IFS Cloud: How to replace Event Action validation (PL/SQL) with Workflow for role-based field restriction

  • March 18, 2026
  • 4 replies
  • 64 views

Forum|alt.badge.img+6

Hi all,

In IFS Apps 10 we used an Event Action (PL/SQL) to block users without the IFSFULL role from changing specific fields (e.g., switching off Project Unique Procurement or enabling Project Access).

In IFS Cloud, since Event Actions are no longer recommended, we are asked to use Workflow.

However, Workflow seems to be approval-based and does not support immediate blocking validation.

Is there a way to enforce this kind of role-based restriction using Workflow, or what is the best practice in IFS Cloud to achieve similar behavior?

Thanks

The event action code.

 

DECLARE
 check_access_       NUMBER := 0;

 CURSOR check_access IS
 SELECT COUNT(1) FROM ifsapp.fnd_role_role t  
  WHERE t.granted_role = 'IFSFULL'
  AND grantee = '#USER_ID#';   
BEGIN

 IF '&OLD:ROWSTATE' != 'Initialized' THEN
    OPEN check_access;
    FETCH check_access INTO check_access_;
    CLOSE check_access;
    IF check_access_ = 0 THEN
      IF '#USER_LANGUAGE#' = 'nl'  THEN
          Error_SYS.System_General('ERROR: Het is niet toegestaan om “Projectunieke inkoop” uit te schakelen en/of om “Projecttoegang actief” in te schakelen.');
      ELSE
           Error_SYS.System_General('ERROR: It is not allowed to swith off the "Project Unique Procurement" and /or to switch on the "Project Access".');
      END IF;
    END IF;
 END IF;

END;

4 replies

Baran
Sidekick (Customer)
Forum|alt.badge.img+5
  • Sidekick (Customer)
  • March 18, 2026

Hello,

Yes, you can create a flow like the one shown and bind it to an event on any page you want. If you do not want a field to be changed, the event condition can be set so that it triggers only when the OLD value is not equal to the NEW value.

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn">
<bpmn:process id="P_Envanter_Malzeme" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_1pgzec9</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_1pgzec9" sourceRef="StartEvent_1" targetRef="Activity_0z43slk" />
<bpmn:sequenceFlow id="Flow_0t9f447" sourceRef="Activity_0z43slk" targetRef="Gateway_18sd30d" />
<bpmn:serviceTask id="Activity_0z43slk" name="Read Purchase Part Status" camunda:class="com.ifsworld.fnd.bpa.IfsProjectionDelegate">
<bpmn:extensionElements>
<camunda:inputOutput>
<camunda:inputParameter name="ifsBpaProjectionAction">READ</camunda:inputParameter>
<camunda:inputParameter name="ifsBpaProjectionETagVariableName">ETag</camunda:inputParameter>
<camunda:inputParameter name="ifsBpaProjectionType">Standard</camunda:inputParameter>
<camunda:inputParameter name="ifsBpaIsOnlyExplicitParameters">true</camunda:inputParameter>
<camunda:inputParameter name="ifsBpaProjectionName">PurchaseRequisitionHandling</camunda:inputParameter>
<camunda:inputParameter name="ifsBpaProjectionEntitySetName">PurchaseReqLinePartSet</camunda:inputParameter>
<camunda:inputParameter name="ifsBpaProjectionParameters">
<camunda:map>
<camunda:entry key="PART_NO">$(PART_NO)</camunda:entry>
</camunda:map>
</camunda:inputParameter>
</camunda:inputOutput>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1pgzec9</bpmn:incoming>
<bpmn:outgoing>Flow_0t9f447</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="Gateway_18sd30d" default="Flow_0cl5jdi">
<bpmn:incoming>Flow_0t9f447</bpmn:incoming>
<bpmn:outgoing>Flow_0otfymj</bpmn:outgoing>
<bpmn:outgoing>Flow_0cl5jdi</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_0otfymj" sourceRef="Gateway_18sd30d" targetRef="Event_140dqcg">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" language="JavaScript">PartNo == "H0003"</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:endEvent id="Event_03py5ku">
<bpmn:incoming>Flow_0cl5jdi</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0cl5jdi" sourceRef="Gateway_18sd30d" targetRef="Event_03py5ku" />
<bpmn:endEvent id="Event_140dqcg">
<bpmn:extensionElements>
<camunda:inputOutput>
<camunda:inputParameter name="ifsBpaValidationErrorMessages">
<camunda:map>
<camunda:entry key="tr">Pasif Malzeme Satın Alınamaz!</camunda:entry>
<camunda:entry key="en">Pasif Malzeme Satın Alınamaz!</camunda:entry>
</camunda:map>
</camunda:inputParameter>
</camunda:inputOutput>
<camunda:executionListener class="com.ifsworld.fnd.bpa.process.validation.IfsBpaFailureEndEventListener" event="end" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0otfymj</bpmn:incoming>
<bpmn:terminateEventDefinition id="TerminateEventDefinition_03rchxn" />
</bpmn:endEvent>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="P_Envanter_Malzeme">
<bpmndi:BPMNEdge id="Flow_0cl5jdi_di" bpmnElement="Flow_0cl5jdi">
<di:waypoint x="476" y="233" />
<di:waypoint x="476" y="180" />
<di:waypoint x="522" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0otfymj_di" bpmnElement="Flow_0otfymj">
<di:waypoint x="476" y="283" />
<di:waypoint x="476" y="350" />
<di:waypoint x="522" y="350" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0t9f447_di" bpmnElement="Flow_0t9f447">
<di:waypoint x="430" y="258" />
<di:waypoint x="451" y="258" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1pgzec9_di" bpmnElement="Flow_1pgzec9">
<di:waypoint x="258" y="258" />
<di:waypoint x="330" y="258" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="222" y="240" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0nt4ko0_di" bpmnElement="Activity_0z43slk">
<dc:Bounds x="330" y="218" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_18sd30d_di" bpmnElement="Gateway_18sd30d" isMarkerVisible="true">
<dc:Bounds x="451" y="233" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1voujbj_di" bpmnElement="Event_03py5ku">
<dc:Bounds x="522" y="162" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0g4p22o_di" bpmnElement="Event_140dqcg">
<dc:Bounds x="522" y="332" width="36" height="36" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>

 


Forum|alt.badge.img+6
  • Author
  • Sidekick (Customer)
  • March 18, 2026

@Baran Can you export this workflow and attach here? I want to check how we can implement this.

Thank you for your reply.


Baran
Sidekick (Customer)
Forum|alt.badge.img+5
  • Sidekick (Customer)
  • March 18, 2026

@SNBSHAN, It didnt let to load exported file directly. You can copy the code above or code below to BPMN file and load the system.


Marcel.Ausan
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • March 18, 2026

@SNBSHAN in IFS Cloud, you could achieve the same results by managing different contexts for Page Configurations.

This way, on the same page, some users could edit a field where others will see it as read-only.

Read more on configuration context here: https://docs.ifs.com/techdocs/25r2/040_tailoring/225_configuration/260_context_based_configuration/?h=context