Comments

  • Rob Raftery

    Thank you Eduardo.  I appreciate your help.  It would be great if you are able to add the swimlane name to the /process-metadata endpoint.

    Rob

  • Rob Raftery

    Hi Eduardo,

    Thank you for your reply.

    In our current use case, we have a VBCS application that is calling a process.  The process is designed to email a bunch of people if certain criteria is met.  In the process design, we are using a Notify task to send the email.  However, the Notify task does not allow you to email a group.  You only have the ability to list individual email addresses.  Therefore, we built an integration which accepts the swimlane name as a parameter.  The integration is designed to return a comma-separated list of email addresses using the swimlane name.  To do this, we are using one of the pre-defined OIC API's (/bpm/api/4.0/identities/roles/{{roleid}}/members) to get a list of members within a role where the roleid is the concatenation of our application and swimlane name (i.e. BillingApp.ProcessOwner).

    As I mentioned in the original post, We know we can hard-code the swimlane name we are passing to the integration, but we would prefer not to do that.  If someone were to go in an change the swimlane names/roles, we would have to remember to update the call to our integration and change the hard-coded reference to the swimlane.

    Ideally, we were hoping to use another pre-defined OIC API (/bpm/api/4.0/process-definitions/{{processDefId}}/process-metadata) to get the swimlane of each task within our process.  You can see a sample output of this API below, but the swimlane name(s)/role(s) are not listed.

        "levels": 0,
        "processDefId": "oracleinternalpcs~Ready4BillingApp!1.0~Ready4BillingProcess",
        "processName": "Ready4BillingProcess",
        "applicationDisplayName": "Ready4BillingApp",
        "revision": "1.0",
        "domain": "oracleinternalpcs",
        "activities": [
            {
                "activityId": "ACTd5a4e0dcda04c634d7087b4e1e36874f",
                "defaultLabel": "Get Swimlane User emails",
                "activityType": "Service task"
            },
            {
                "activityId": "ACTe3f3ea2efccacab28fe7191c6d6ed604",
                "defaultLabel": "Notify Swimlane User",
                "activityType": "Notification task"
            },
            {
                "activityId": "ACTce3e8e6a980abea079c7441a420c9122",
                "defaultLabel": "Check BO Billing Process complete",
                "activityType": "Service task"
            },
            {
                "activityId": "ACT94c5e32a7b9265f5acb16d12af8c0a75",
                "defaultLabel": "Update L2CW BO Status to Complete",
                "activityType": "Service task"
            },
            {
                "activityId": "ACTe2970b9e49140276161a39e7f4d31a81",
                "defaultLabel": "Notification task",
                "activityType": "Notification task"
            },
            {
                "activityId": "EVT18127891795312",
                "defaultLabel": "Start event",
                "activityType": "Start"
            },
            {
                "activityId": "EVT18127891795493",
                "defaultLabel": "End",
                "activityType": "End"
            },
            {
                "activityId": "EVTfe1060941abab5adf9de211f34340f5b",
                "defaultLabel": "Wait 1 Day\n(30 seconds)",
                "activityType": "Catch event"
            },
            {
                "activityId": "GTWea9a4e20e567591ee2346fadb2ada55d",
                "defaultLabel": "Incomplete recs?",
                "activityType": "Exclusive Gateway"
            }
        ]


    We haven't found another API that does it, and I'm guessing one does not exist, but we wanted to ask the question.

    Thanks,
    Rob

  • Rob Raftery

    Hi Shay,

    Sorry, I should have been more clear in my original post.  I AM trying to pass an array of strings to a function.  However, the function is being used in the validator attribute for an input text component.  The variable $variables.SearchCriteria is my array of strings.  Below is the code assigned to the validator attribute for my input text component.  The function code is also attached below.

    {{ $flow.functions.searchCriteriaValidator($variables.SearchCriteria) }}

    Through some testing and debugging, it seems like functions used in the validator attribute are reserving the first parameter for the components Value property in the Data section.  If I change the validator definition to

    {{ $flow.functions.searchCriteriaValidator("",$variables.searchCriteriaValues) }}

    I am able to successfully parse the array of strings because they come into the validator function appropriately.  Notice how I am simply passing "" as the first parameter.  The validator function doesn’t seem to care about the first parameter.  Even though I am passing "" as the first parameter, the validator function still knows to use whatever is stored in the components Value property.

    Is this normal behavior for a validator?  We haven't seen this documented anywhere.  This is just the behavior I am seeing during my testing.

      FlowModule.prototype.searchCriteriaValidator = function(parm, array_parm) {
        return [{
          validate: (parm) => {
              console.log('HERE??? ' + array_parm.length);
              console.log('HERE??? ' + array_parm);
              for (var x = 0; x < array_parm.length; x++) {
                console.log('HERE???'+ '|' + x + '|' + array_parm[x]);
                console.log('HERE???'+ '|' + x + '|' + array_parm);
                if (array_parm[x]) {
                  console.log(x + '|' + array_parm[x]);
                  return true;    
                }
              }

              throw new Error('You must provide at least one search criteria');
          }
        }];
      };

     

  • Rob Raftery

    It actually starts off as "Expression" when I first make the assignment.  However, when I go back in it shows it as "Static Content":

    [
     "{{ $page.variables.searchCriteriaValues }}"
    ]

    If I change it, again, to "Expression" it looks even worse:

    [
     "{{ [\n \"{{ $page.variables.searchCriteriaValues }}\"\n] }}"
    ]

    It doesn't want to stay as an "Expression".

  • Rob Raftery

    We figured out our issue.  Instead of using the roles array like $application.user.roles[0], we had to use $application.user.roles.Billing where Billing is one of the roles defined in our application.

  • Rob Raftery

    Hi Shay,

    I think I see the problem with my filter criterion, but I don't understand how it is happening.  If you look at the attached image, you can see that my filter criterion is being passed into the SDP in the wrong order.  The first object is listed as attribute, op and value, but the remaining criteria are all listed as op, attribute and value.  I'm assuming the order matters and they all must be in attribute, op and value order.  If this is true, I don't understand how they are being listed out of order.

    In my appication, I created an object type with 3 fields (attribute, op and value) in that order.  Then I created 6 separate variables of that object type to hold the filter criteria for my 6 search fields.  I then followed the blog code and created the function below.  I call the functoin passing in the 6 variables holding my object type for the 6 search criteria.  The function simply checks to see which criteria have a search value and the function returns an array of the 6 objects.

    In my action chain, I am assigning the output of this function all to the filter criterion of my SDP.  You can see that in the other image.  I am assigning it to the [] criteria portion of the filter criteria and I am also specifying $and in the op parameter.

    Any thoughts on the ordering of the fields within the filter criteria?

      PageModule.prototype.prepareSearchQueryParams = function (q1, q2, q3, q4, q5, q6) {
        if (!q1.value) {
          q1.value == '';
        }
        if (!q2.value) {
          q2.value == '';
        }
        if (!q3.value) {
          q3.value == '';
        }
        if (!q4.value) {
          q4.value == '';
        }
        if (!q5.value) {
          q5.value == '';
        }
        if (!q6.value) {
          q6.value == '';
        }

        var res = [q1, q2, q3, q4, q5, q6];
        
        return res;
      };

     

  • Rob Raftery

    Hi Aparna,

    Thanks a lot for your replies.  You have helped determine I am, in fact, experiencing a firewall issue.  I appreciate all your help.

    Thanks,
    Rob
  • Rob Raftery

    Hi Aparna,

    Thanks for replying...

    It appears Postman only works if I am connected to my company VPN.  I am using HTTP with No Auth.  As soon as I connect to the VPN, Postman is unable to get a response.

    Before running these tests, I have stopped ORDS and removed all references to the self-signed certificate in the standalone.properties table.

    My question now is where do I go from here?  I'm assuming I need put back the self-signed certificate, but I must have been doing something wrong when I did because it wasn't working.  I'm not 100% sure I tested both on and off the VPN when I had applied the certificate.

    Also, I am not using an IP address.  I am testing using a hostname.

  • Rob Raftery

    I am able to successfully test the endpoint using HTTP from both Postman and Swagger.

  • Rob Raftery

    Hi Shay,

    Thanks for your reply.

    Are you suggesting, I can still use my HTTP url and simply just need to enable authentication / proxy and select "None (Use Proxy)" as the authentication mechanism?  I tried doing that, and I'm still getting the same error above.

    I then tried to follow the blog post to create a self-signed certificate.  I was able to import the certificate, which only allowed me to import the pem format.  However, I am still unable to get it to work.  Am I supposed to switch to HTTPS?  That too didn't work.  Do I need to select a different authentication mechanism?  So far all combinations have yielded the same timeout error.

    Thanks,
    Rob
  • Rob Raftery

    Hi Hugo,

    See if you can follow these steps to get it to work:

    How you get here is through the nav-bar on the left side starting at the Home Page of OIC:

                -Click on My Tasks

                -In the top right hand corner there should be a Workspace button (click this)

                -Click on Administration in the left Nav-Bar

                -Once you are in administration click Services in the left Nav-Bar

                -You will see two tabs (platform and infrastructure), you want to switch to Infrastructure 

    Good Luck!
    Rob
  • Rob Raftery

    Thank you Shay!

    This approach worked great.  Learning something new every day with VBCS.  Appreciate all your help.

    Rob

  • Rob Raftery

    Dave,

    Thank you for your comments.

    1. I have used "reset=empty" before.  However, I needed to do something different in this case because, as you mentioned in your second comment, I am doing page validation that forces the user to enter something in the input text.  Reloading the array and setting "reset=empty" was not working for me.
    2. I am doing validation to force the user to enter something in the input text, but imagine the page was pre-populated with values in each input text.  The user decides to change the value in one of the input texts'.  However, he forgot what the original value was and the input text is now empty.  I offer a Reload button to return the page back to the way it was upon vbEnter.  I was looking for a way to avoid the user having to enter any value in the input text just to get by the validation.  It saves them an extra step.
    3. I did make sure the ADP have values in every row.
    4. I am looking for a way to dynamically set readonly on any one or multiple input texts' in my editable table based on a condition.  As I am loading my ADP, I want to be able to set the readonly property of each input text to false if a certain condition is true.  I am thinking I need to do this using a javascript function, but the things I have tried are not working.
  • Rob Raftery

    Thank you Shay!

    Using the Fire Data Provider Event worked.  I actually tired using it in two different circumstances and both worked:

    1. I did as you suggested and fired it immediately after fetching my data from my REST endpoint and prior to assigning the data from the REST endpoint to my ADP.
    2. Rather than fetching my data again, I was using a backup array that I loaded at the same time I loaded my ADP during vbEnter.  When the user clicked the Reload button, I was simply reassigning my backup array to my ADP.  I added the Fire Data Provider Event just before I reloaded my ADP and it workes as well.

    Thanks for your help.

  • Rob Raftery

    Hi Shay,

    Thanks for the reply.  I had tried the Reset Variables, but I couldn't get it to work.  I'm using an ADP to load the editable table.  In the reset, I had tried both options:

    1. $page.variables.SVCDEF_Array - Resetting the entire object
    2. $page.variables.SVCDEF_Array.data - Resetting just the data portion

    Also, when reloading the main ADP, I am using a backup ADP array that I load at the same time I am loading the main ADP.  When I am reloading the main ADP, I have tried using both options:

    1. Assigning the entire backup ADP to the main ADP
    2. Assigning just the data portion of the backup ADP to the main ADP

    In all cases, the main ADP ends up empty.  I have attached the inspect -> console (console_resetting_ADP_and_using_ADP_backup_to_reset.txt) so you can see the exception.

    I have even tried calling my reload page action chain, which I call on vbEnter, to reload the page instead of assigning my backup ADP to my main ADP, but I get the same results.  In fact, it looks like it never gets to the point of calling my reload page action chain.

    The only way I could get this to work, was to write my own JS function which simply loops through all the input text components in my editable table and calls the reset property.

    for (i = 0; i < VariableArray.data.length; i++) {
          document.getElementById([[ComponentName + i]]).reset();
        }

    Is there a way to see the JS code behind the Reset Variables action that VBCS is doing when you calling that step?  I'm curious as to what it is doing.

    Also, if I may, I have a slightly unrelated question.  While doing all of this input text validation, I would like to be able to dynamically change the state of the input text in my editable array from readonly false to readonly true to prevent the user from being able to overwrite the contents.  Everything I have tried isn't working.  The main thing I have tried that I though should work is to call the function below to change each input text to readonly = true based on a certain condition.  However, when running the application, I am still able to update the text.

    for (i = 0; i < VariableArray.data.length; i++) {
          if (VariableArray.data[i].COSS_SERVICE_DEFINITION_NAME == VariableArray.data[i].L2CW_SERVICE_DEFINITION_NAME) {
            document.getElementById([[ComponentName + i]]).readOnly = true;
          }
        }

    Thanks for all your valuable help.

    Rob