Issues creating from an Editable List and starting secondary workflow


Badge +2

Hi Community,

 

I've came across an issue when working with an Editable List view. Some context:

I have an editable list for holding actions to be made. Each record in the row contains an "ACTION BY" field which is filled in from AD using the picker control. Each added record needs to start a new workflow and a destination user is the one filled using the picker control. I am using Oracle Database and a Storage Procedure to create and Increment the user ID each time. The create procedure has the ID output to a parameter to hold the ID of the record, which is then input to a workflow data field when starting the sub-workflow.

 

14890iE820B9248226D4D5.png

 

I am currently testing the create and a have the workflow disabled. The first record is created fine each time, however the list view appears to clear automatically after this is done and no other data is found, so my create procedure can't execute as the fields are required.

 

I have no output mappings in the create procedure that would cause the list view to clear, is there any way I can get around this? I'm not sure if it's a bug, intentional or my error, but I definitely haven't configured any rules to clear the list view.

 

Any help is appreciated!


Thanks,

 

Simon


3 replies

Userlevel 2
Badge +9

Hello Simon,


 


I am guessing these actions are tied to the event of a button being clicked?


 


This may not be the most efficient way but can we run a view method before running the stored procedure? You could try doing a force load of the list view after it disappears. 


 


However, now that I am thinking about this. It shouldn't be pulling this data from the list view. You should be pulling from the smartobject that the list view is displaying. The view is essentially just a display mechanism. Could you provide the code being used for your stored proc perhaps? 


 


Also be sure that there are no rules on the view level that could be causing this list view to clear upon that button being clicked. Or any action that is associated with the form.


 


Thanks,
Evan

Badge +2

Hi Even,

 

Yeah that's right, a button is being used to execute a create procedure on a list view. The data being input is pulled from the SmartObject and the first record saves just fine, but when it does the list view is completely cleared.

 

I checked if the same thing would happen with the built-in create method and it did not, so it seems to be related to the stored procedure, but I can't use the create method as I need the ID returned to start a workflow, and Oracle does not provide the Autonumber data type. The SQL code used for the procedure is below:

 

_______________________________________________________________________

 

create or replace PROCEDURE            SE_PA_CREATE_PROCEDURE (
   SE_ID                IN  NUMBER,
   ID                   OUT NUMBER,
   ACTION_DETAILS       IN  VARCHAR2,
   ACTION_BY            IN  VARCHAR2,
   TO_BE_COMPLETED_BY   IN  DATE)
IS
BEGIN
          INSERT INTO SAFETY_EVENT_PA (ID,
                                           SE_ID,
                                           ACTION_DETAILS,
                                           ACTION_BY,
                                           TO_BE_COMPLETED_BY)
          VALUES (SAFETY_EVENT_PA_ID_SEQ.NEXTVAL,
                SE_ID,
                ACTION_DETAILS,
                ACTION_BY,
                TO_BE_COMPLETED_BY);

      SELECT SAFETY_EVENT_PA_ID_SEQ.CURRVAL INTO ID FROM DUAL;

END SE_PA_CREATE_PROCEDURE;
_______________________________________________________________________

 

Thanks,

Simon

Userlevel 1
Badge +8

Ahhh, I think I suspect what is going on. You are calling the create method that is on the smart object that is bound to the view. When you call the create you are returning a single value which if i am understanding correctly wiping out the other data in the smartobject because those properties (which around bound, don't forget there is binding) didn't return as the only value returned was ID.

 

What you might want to try is either:

  1. Returning all the values the list view expects and then calling the view refresh method (which I didn't see if your rule snapshot)
  2. Bind that particular create method to a different smart object and call just that method on the other smartobject (not the view bound one).

I don't think is somethng unique to Oracle in this case, just some tweaks needed to the solution to ensure everything is firing as expected.

 

S.

Reply