Process Display Functions

Overview

When utilized with the companion Process Display Component allows designers to configure UIs that display process status on the process model itself to end users.

Key Features & Functionality

Provides one function:

  • getProcessForDisplayData - that given a process id returns a JSON representation of that process model and state for use with the companion displayProcess component provided by the Process Display Component
Anonymous
  • v1.0.2 Release Notes
    • Added license file
  • Can you help with this error?

    error: "Expression evaluation error at function 'getprocessdatafordisplay"

    Or can you tell me how to get the plugin to put an error in the log that I might followup in the issue myself?

  • I am also getting this error: ""Expression evaluation error at function 'getprocessdatafordisplay"

    It seems to happen most times on process models that are more then a week old. However I have had it work on really old process models as well - not many but a few.
    This plugin is well liked and I would really like to see this issue resolved.

  • Hi John,

    I am experiencing the same behavior reported by

    I experience an error in the function in two specific cases:

    • in case of a change of the displayed instance
    • In the case of a change to the process model without publishing. When I try to display an instance with an earlier version than the one currently in draft, the function goes into error

    the first case is a change to fix a bug in the instance
    the second case is a use case for the end user

    Could you fix this problems?

    Regards

  •  Is it any process modification to resolve an error? or is it specific to your use case?  I'll try to see if I can reproduce and debug the issue.

  • Hi,

    Why when we modify a process instance to resolve an error, this function stops working on this process and instead of returning the result to us it returns this error: "Expression evaluation error at function 'getprocessdatafordisplay"

    Could you fix this problems?

    Regards

  •  I haven't had a chance to look into this yet, but the case you are describing (where a process display is updated based on selection of a different process) is the case in the example application that is provided with the plugin.

    Admittedly it has been some time since I ran that application, but when I last did it updated the process correctly - so maybe look for differences in logic with that application?  I'll try to find some time to see if I can replicate your issue within that app as well (since I won't be able to test your code directly since the query won't work for me).

  • We have a problem with this plugin.

    We have an interface with a grid that show the active process (below you can find the code) and we expect that when the users select a process form the grid and we save the process id, using the display process the diagram of the process will be showed. The problem is that when you select the process the first time it works correctly, but the second time the display process show an image that is the sum of the new process selected and the second one with activity of both of them. It is like this plugin take in memory the diagram of the forst process and doesen't release it when we select another one. The page will be refreshed only when we refresh the page with f5 and also clicking on test button of the interface doesen't refresh this component.

    Could you update the plugin or let us know how solve the issue?

    a!localVariables(
    local!wfPeriodicitaFilter,
    local!wfStateFilter,
    local!wfSelectedRows,
    local!fromFilter,
    local!toFilter,
    local!wfSelection,
    local!wfNameFilter: {},
    local!wfIdProcesso,
    local!idStepScheduleSelection: a!defaultValue({},null),
    a!boxLayout(
    label: "Monitoraggio per utilizzo",
    contents: {

    a!sectionLayout(
    label: "WorkFlow",
    labelSize: "SMALL",
    labelColor: cons!MDW_STYLE_COLOR_ISP_TXT,
    contents: {
    a!gridField(
    labelPosition: "ABOVE",
    data: a!queryEntity(
    entity: cons!MDW_ENTITY_V_WF_MASTERDATA_SCHEDULE,
    query: a!query(
    logicalExpression: a!queryLogicalExpression(
    operator: "AND",
    filters: {
    a!queryFilter(
    field: "statoSchedulazione",
    operator: "not in",
    value: {"Eliminato", "In Elaborazione"}
    ),
    a!queryFilter(
    field: "name",
    operator: "in",
    value: a!flatten(local!wfNameFilter)
    ),
    a!queryFilter(
    field: "statoSchedulazione",
    operator: "=",
    value: local!wfStateFilter
    ),
    a!queryFilter(
    field: "periodicita",
    operator: "=",
    value: local!wfPeriodicitaFilter
    ),
    a!queryFilter(
    field: "dataRiferimento",
    operator: ">=",
    value: local!fromFilter
    ),
    a!queryFilter(
    field: "dataRiferimento",
    operator: "<=",
    value: local!toFilter
    )
    },
    ignoreFiltersWithEmptyValues: true
    ),
    pagingInfo: fv!pagingInfo
    ),
    fetchTotalCount: true
    ),
    columns: {
    a!gridColumn(
    label: "Name",
    sortField: "name",
    value: fv!row.name
    ),
    a!gridColumn(
    label: "Designer",
    sortField: "Designer",
    value: fv!row.designer
    ),
    a!gridColumn(
    label: "Periodicita",
    sortField: "periodicita",
    value: fv!row.periodicita
    ),
    a!gridColumn(
    label: "Data Schedulazione",
    sortField: "dataSchedulazione",
    value: if(
    isnull(fv!row.dataSchedulazione),
    fv!row.dataSchedulazione,
    datetext(fv!row.dataSchedulazione, "default")
    ),
    align: "END"
    ),
    a!gridColumn(
    label: "Data Riferimento",
    sortField: "dataRiferimento",
    value: if(
    isnull(fv!row.dataRiferimento),
    fv!row.dataRiferimento,
    datetext(fv!row.dataRiferimento, "default")
    ),
    align: "END"
    ),
    a!gridColumn(
    label: "Stato",
    value: choose(wherecontains( fv!row.statoSchedulazione,{"Censito", "In Elaborazione","Eliminato", "Avviato"}),
    a!tagField( tags: {a!tagItem(
    text: "Censito",
    backgroundColor: "SECONDARY"
    )}),
    a!tagField( tags: {a!tagItem(
    text: "In Elaborazione",
    backgroundColor: "SECONDARY"
    )}),
    a!tagField( tags: {a!tagItem(
    text: "Eliminato",
    backgroundColor: "NEGATIVE"
    )}),
    a!tagField( tags: {a!tagItem(
    text: "Avviato",
    backgroundColor: "POSITIVE"
    )}))
    ),
    a!gridColumn(label: "", value: choose(wherecontains( fv!row.statoSchedulazione,{"Censito", "In Elaborazione","Eliminato", "Avviato"}),
    a!buttonArrayLayout(
    buttons: {
    a!buttonWidget(
    label: "",
    icon: "play",
    tooltip: "Avvio Manuale",
    value: ""/**/,
    saveInto: {

    },
    size: "SMALL",
    style: "SECONDARY",
    loadingIndicator: true,
    confirmButtonLabel: "Avvio manuale"
    )}),
    {},
    {},
    a!buttonArrayLayout(
    buttons: {
    a!buttonWidget(
    label: "",
    icon: "stop",
    tooltip: "Avvio Manuale",
    value: ""/**/,
    saveInto: {a!cancelProcess(
    processId: fv!row.id,
    onSuccess: "Process Cancelled",
    onError: "Error"
    )},
    size: "SMALL",
    style: "SECONDARY",
    loadingIndicator: true,
    confirmButtonLabel: "Avvio manuale"
    )})
    ))
    },
    pageSize: 6,
    initialSorts: a!sortInfo(
    field: "dataSchedulazione",
    ascending: false
    ),
    selectable: true,
    selectionStyle: "ROW_HIGHLIGHT",
    selectionValue: local!wfIdProcesso,
    selectionSaveInto: {
    a!save(local!wfIdProcesso, fv!selectedRows.id),
    a!save(local!wfSelection, fv!selectedRows),
    a!save(local!wfSelectedRows, index(fv!selectedRows, length(fv!selectedRows), null))
    },
    disableRowSelectionWhen: false,
    validations: {},
    spacing: "DENSE",
    height: "AUTO",
    borderStyle: "STANDARD",
    shadeAlternateRows: true
    )
    },
    isCollapsible: true,
    isInitiallyCollapsed: if(not(isnull(local!wfSelectedRows)),true, false),
    dividerColor: cons!MDW_STYLE_COLOR_ISP_TXT
    ),
    a!sectionLayout(
    label: "Diagramma WorkFlow",
    labelSize: "SMALL",
    labelColor: cons!MDW_STYLE_COLOR_ISP_TXT,
    contents: {
    a!localVariables(
    local!processData: if( rule!APN_checkIsNullorEmpty(local!wfIdProcesso), null, getprocessdatafordisplay(local!wfIdProcesso)),
    displayProcess(
    labelPosition: "ABOVE",
    validations: {},
    height: "AUTO",
    showWhen: not(isnull(local!wfIdProcesso)),
    processData: local!processData
    ))
    },
    isCollapsible: true,
    isInitiallyCollapsed: if(not(isnull(local!wfIdProcesso)),true, false),
    dividerColor: cons!MDW_STYLE_COLOR_ISP_TXT
    )
    },
    style: cons!MDW_STYLE_COLOR_ISP_TXT,
    padding: "LESS",
    marginAbove: "NONE",
    marginBelow: "NONE"

    )
    )

  • v1.0.1 Release Notes
    • Security updates
  • yes, its working now. Thanks!