1

Im facing an issue in Process Flow. Im trying to set the state of the ProcessFlowLaneHeader to Positive, But I'm not able to see the node in green colour. Can you please help me how can i fix this issue. Below is the code that i have tried..

<ui:ProcessFlow class="processFlow" scrollable="false" showLabels="false">                      
    <ui:lanes>
        <ui:ProcessFlowLaneHeader iconSrc="sap-icon://order-status" text="Apply" press="onNodeLeaveApply"
                            state="{[sap.suite.ui.commons.ProcessFlowNodeState.Positive]}" position="0"/>
        <ui:ProcessFlowLaneHeader state="{[sap.suite.ui.commons.ProcessFlowNodeState.Positive]}" iconSrc="sap-icon://customer" text="Review"
                            press="onNodeLeaveReview" position="1"/>
        <ui:ProcessFlowLaneHeader state="{[sap.suite.ui.commons.ProcessFlowNodeState.Positive]}" iconSrc="sap-icon://inventory" text="Sent"
                            press="onNodeLeaveSent" position="2"/>
    </ui:lanes>
</ui:ProcessFlow>

Please check the screenshot here I'm not able to get the nodes in Green colour..

enter image description here

When I tried to change the node from Controller by pressing the node, it is changing to grey(Neutral). Below is my Controller Code.

     onNodeLeaveApply:function(oEvent){

 oEvent.mParameters.oParent.mAggregations.lanes[0].setState(["sap.suite.ui.commons.ProcessFlowNodeState.Positive"]);
            },

enter image description here

Please help me how can I change the state to Green Colour(Positive)

Thank you in advance

1
  • What you're referencing to is not the node, but the LaneHeader. The nodes are the square notes below these headers
    – Eldwin
    Mar 20, 2021 at 19:39

1 Answer 1

1

Sorry, the first answer was hasty and incorrect. The state property is indeed an array of pairs { state, value }. The event handler of "press" can access the ProcessFlowLaneHeader as the source of the event, so oEvent.mParameters.oParent.mAggregations.lanes[0] line should be changed to oEvent.getSource():

onNodeLeaveApply: function(oEvent) {
    oEvent.getSource().setState([{
        state: sap.suite.ui.commons.ProcessFlowNodeState.Positive,
        value: 20
    },
    {
        state: sap.suite.ui.commons.ProcessFlowNodeState.Negative,
        value: 10
    }]);
}

Instead of sap.suite.ui.commons.ProcessFlowNodeState.Negative or sap.suite.ui.commons.ProcessFlowNodeState.Positive you can use strings "Negative" and "Positive" with the same result:

onNodeLeaveApply: function(oEvent) {
    oEvent.getSource().setState([{
                state: "Positive",
                value: 20
            },
            {
                state: "Negative",
                value: 10
            }]);
        }
2
  • Thank you for your response. But it didnt worked for me..:( Im not understanding what is the issue exactly.. Feb 10, 2018 at 5:59
  • Awesome.. This Solution worked for me. Thank you for your observation, You helped me with your quick solution.. Kudos.. :) Feb 10, 2018 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.