Process Log
delete records
7.14_()
studio

We have over 300,000 records in our Process Log.  We'd like to delete records that are not Running or Error that are over one month old.  They are supposed to be archived, but there are records from months ago that have not been archived. When I select a record, there is no option to delete it or archive it. How do I delete or archive records from the Process Log?

Like 0

Like

4 comments

Dear Janine, 

Process log gradually gets cleared by the archivation process. We don't recommend to delete data from Process Log yourself. However, if you really need to delete that data we recommend to send a request to the support@bpmonline.com if your instance is in cloud as it requires very resource heavy sql operations that would not be possible to track with sql executor. 

If your instance is on-site you can take the instruction below as an example to adapt it based on your needs: 

1) Register SQL procedures tsp_DeleteSysProcessLog.sql and tsp_DeleteSysProcessLogByStartDate.sql (procedures themselves below)

2) Execute the procedure.

Example: EXEC [dbo].[tsp_DeleteSysProcessLogByStartDate] 'Error', '2017-09-22', -1,

Where 'Error' is the status of processes,  '2017-09-22' by which start date to delete processes, '-1' how many processes to delete, -1 means all processes. 



Please note that the operation is very resource heavy and time consuming and we don't recommend doing that during business hours. 

Best regards, 

Dennis

 

IF NOT OBJECT_ID('[dbo].[tsp_DeleteSysProcessLogByStartDate]') IS NULL

BEGIN

    DROP PROCEDURE [dbo].[tsp_DeleteSysProcessLogByStartDate]

END

GO

CREATE PROCEDURE [dbo].[tsp_DeleteSysProcessLogByStartDate]

    @Status nvarchar(max),

    @StartDate date,

    @RowsCountToDelete int

AS

BEGIN

    SET NOCOUNT ON

    IF NOT OBJECT_ID('#SysProcessLogId') IS NULL

    BEGIN

        DROP TABLE #SysProcessLogId

    END

    

    CREATE TABLE #SysProcessLogId (Id uniqueidentifier)

    IF @RowsCountToDelete > -1

        INSERT INTO #SysProcessLogId ([Id])

        SELECT Top (@RowsCountToDelete)

            SysProcessLog.Id

        FROM SysProcessLog

        JOIN SysProcessStatus ON SysProcessStatus.Id = SysProcessLog.StatusId

        WHERE

            SysProcessLog.ParentId IS NULL AND

            SysProcessLog.StartDate < @StartDate AND

            SysProcessStatus.[Name] = @Status

    ELSE

        INSERT INTO #SysProcessLogId ([Id])

        SELECT

            SysProcessLog.Id

        FROM SysProcessLog

        JOIN SysProcessStatus ON SysProcessStatus.Id = SysProcessLog.StatusId

        WHERE

            SysProcessLog.ParentId IS NULL AND

            SysProcessLog.StartDate < @StartDate AND

            SysProcessStatus.[Name] = @Status

    EXEC [dbo].[tsp_DeleteSysProcessLog]

END

GO



CREATE OR REPLACE PROCEDURE "tsp_DeleteSysProcessLogById" (id VARCHAR2)

IS

    TYPE IdSet IS TABLE OF VARCHAR2(38);

    input_ids IdSet;

    i NUMBER;

BEGIN

    SELECT

        "Id"

        BULK COLLECT INTO input_ids

    FROM "SysProcessLog"

    WHERE "ParentId" = id;

    IF input_ids.COUNT() > 0 THEN

    FOR i IN input_ids.FIRST .. input_ids.LAST

      LOOP

        BEGIN

          "tsp_DeleteSysProcessLogById"(input_ids(i));

        END;

    END LOOP;

    END IF;

    DELETE FROM "SysProcessElementLog"

    WHERE "SysProcessId" = id;

    DELETE FROM "SysProcessLog"

    WHERE "Id" = id;

END;

/

CREATE OR REPLACE PROCEDURE "tsp_DeleteSysProcessLog" (inputRowsCountToDelete IN INT, status IN VARCHAR2)

    IS

    TYPE IdSet IS TABLE OF VARCHAR2(38);

    input_ids IdSet;

    i NUMBER;

    step INT := 1000;

    startDate TIMESTAMP;

    rowsCountToDelete INT := inputRowsCountToDelete;

    allRowsCount INT;

    rowsLeft INT;

BEGIN

    DBMS_OUTPUT.PUT_LINE('Database: ' || USER);

    startDate := CURRENT_TIMESTAMP;

    IF (inputRowsCountToDelete <= 0) THEN

            SELECT COUNT("Id") INTO rowsCountToDelete FROM "SysProcessLog";

    END IF;

    SELECT

        "SysProcessLog"."Id"

        BULK COLLECT INTO input_ids

    FROM "SysProcessLog"

    WHERE

    "SysProcessLog"."ParentId" IS NULL

    AND "SysProcessLog"."StatusId" IN

        (SELECT

            "SysProcessStatus"."Id"

        FROM "SysProcessStatus"

        WHERE INSTR(status, "SysProcessStatus"."Value") > 0)

    AND NOT EXISTS(SELECT "SysProcessData"."Id" FROM "SysProcessData" WHERE "SysProcessData"."Id" = "SysProcessLog"."Id")

    AND ROWNUM <= rowsCountToDelete;

    allRowsCount := input_ids.COUNT();

    DBMS_OUTPUT.PUT_LINE('Number of records to process: ' || rowsCountToDelete);

    IF allRowsCount > 0 THEN

        rowsLeft := allRowsCount;

        FOR i IN input_ids.FIRST .. input_ids.LAST

            LOOP

                BEGIN

                    IF MOD(i, step) = 0 THEN

                        DBMS_OUTPUT.PUT_LINE('Step ready: ' || TO_CHAR(CURRENT_TIMESTAMP, 'DD-MM-YYYY HH24:MI:SS.FF2'));

                        DBMS_OUTPUT.PUT_LINE('Rows left: ' || rowsLeft);

                    END IF;

                    "tsp_DeleteSysProcessLogById"(input_ids(i));

                    rowsLeft := rowsLeft - 1;

                END;

            END LOOP;

        END IF;

    DBMS_OUTPUT.PUT_LINE('Number of records processed: ' || allRowsCount);

    DBMS_OUTPUT.PUT_LINE('---------------------------------------------------------------');

    DBMS_OUTPUT.PUT_LINE('Execution time: ' || TO_CHAR((CURRENT_TIMESTAMP - startDate), 'DD-MM-YYYY HH24:MI:SS.FF2'));

END;

/

--CALL "tsp_DeleteSysProcessLog"(10000, '2,4');

 

 

Thanks, I have reported it to Support since there are records even from April that haven't been archived.

I found Beesender tried to delete process log by a process to delete items from Process log (actual). Is that correct or is there any risk of doing that way? 

Van Ly,

Process log is connected to several other tables so there is a risk of not deleting all necessary records or possibly corrupting some necessary data.

Best regards,

Dennis  

Show all comments
Button
edit page
7.14_()
studio

When I open my page on a large screen the simple info button / user hint appears as desired/correctly:

However, when I minimize the screen or view my page on a smaller screen, the simple info buttons / user hints appear over the top of the boolean field, where as the text field info button remains the same?

How am I able to wrap the info button to the boolean fields?

Like 0

Like

1 comments

Please feel free to modify CSS according to your needs. The article by the link below explains how to add a new CSS class. If you add it to the BootstrapModulesV2 module then it will be loaded after loading the application. 

https://community.bpmonline.com/questions/how-add-custom-style-control-…

Show all comments
7.14_()
studio

What is the ageing of data that is present under Customer History of Opportunities. If I want to configure it to show data only for last 6 months , how can I do that ?

Like 0

Like

1 comments

Dear Shailey,

Please note that any detail in the application displays all data associated with it. In order to apply the filter please click on the three dots near the detail name and choose the “Apply filter” option.

Please find more information by the link below:

https://academy.bpmonline.com/documents/technic-sdk/7-13/filters

Best regards,

Norton

Show all comments
studio
Business Process
7.14_()
Read Data

I created a Business Process and when calling the service externally by Postman for example I can not receive the returned data. I need to return customer data. I am using the object "Read Data".

File attachments
Like 0

Like

1 comments

Hello, 

Regarding to the read data part, we would recommend you to use script task as in example on the academy. 

https://academy.bpmonline.com/documents/technic-sdk/7-13/how-run-bpmonline-processes-web-service



The call of the process with script task returns nothing as you haven't specified return parameter, that is why it returns 1 stating that the process was called. Please try calling the process with the link http[s]://<bpm'online_application_address>/0/ServiceModel/ProcessEngineService.svc/UsrGetCustomer/Execute?ResultParameterName=ParameterReturn

Best regards,

Dennis 

Show all comments

I created a Business Process and when calling the service externally by Postman for example I can not receive the returned data. I need to return customer data.

 

 

 

File attachments
Like 0

Like

3 comments

Dear Marcelo,



In this case, we recommend using “ScriptTask” instead of the “ReadData” element. Also, please note that we recommend calling the service via C#.

For more detailed assistance, please contact technical support.



Best regards,

Norton

Norton Lingard,

 

I tried with Script Task but still the service returns null

Best Regars,

Marcelo

Dear Marcelo,



After a further investigation, we have found out that since version 7.13 this service is no longer able to return the parameter value. It was possible only in compiled processes, however, since version 7.13 all processes are interpreted. As a workaround, you can integrate with bpm and do all the needed logic with the integration instead of business process. Please find more information by the link below:



https://academy.bpmonline.com/documents/technic-sdk/7-13/integration-bp…



Best regards,

Norton

Show all comments
functional roles
portal users
7.13_()
studio

Hi Community,

How we can add functional roles to Portal Users?

Thanks

 

Like 0

Like

1 comments

Hi Fulgen,

You can fallow the below link for creating the portal users 

https://academy.bpmonline.com/documents/portal/7-14/add-portal-users#XREF_48563

If you observed in below screenshot there is an option called function roles you can add there.

Regards,

praveen

Show all comments
7.14_()
studio

Hi all,

Is it possible to track the login and logout time of users on mobile in both offline and online modes?

Thanks.

Like 0

Like

3 comments

Dear Amanthena,

There are no basic tools in the mobile app to track the users activity. However, you can create the dashboards which would allow you to track this in both modes. Here are  the examples of the dashboards I've created http://prntscr.com/p13e4s

Best regards,

Dean

Dean Parrett,

Thanks so much for your response! We need these dashboards primarily on the web and not on mobile. However, we would need to track the sessions and history of sessions per user on the mobile too. I gather from your response that this is possible by building a custom dashboard on the web. Is that correct? I have a follow-up question. Just curious as to how these sessions are tracked for users who are offline on the mobile. Does the mobile locally record the session in offline mode and send the details to the server during the synchronization process?

Dear Amanthena,

That is correct. You need to build the new dashboard using browser version of the application and then you will be able to see it in the mobile application. As for tracking sessions in offline mode - unfortunately the application doesn't support this function. It can only be achieved with the help of complex development process. The idea might be in creating some table that would record the users' activity offline and then send the data into SysUserSession table once the mobile app is online. Unfortunately, we do not have any examples of similar implementations. 

Best regards,

Dean

Show all comments
mobile application
7.13_()
studio

Hi Community,

Any idea how we can show user profile in mobile just like what you have in web version.

 

 

Like 0

Like

0 comments
Show all comments
7.14_()
studio

Hi, 

Is is possible to have quick filters for detail similar to the Owner and Date filters on the Activity Section? If so, is there any academy article on that? 

Thank you, 

Hatim

Like 0

Like

3 comments

Dear Hatim,

Your detail object needs to have the Owner or Date columns to be able to display them in the filter. Here is the example.

Lets add the owner lookup field based on the contacts to the Noteworthy Events detail. As the result, you can get apply the filter to the detail http://prntscr.com/ozg26u and select the owner  http://prntscr.com/ozg2bf

You can also set up the columns of the detail http://prntscr.com/ozg2jf http://prntscr.com/ozg2oh and display the  owner http://prntscr.com/ozg2uc&nbsp;

Best regards,

Dean

Dean Parrett,

Thank you for your response. 

We do have owner and date fields in the date to filter on, however we want these filters available as quick filters (just like Owner and Date Quick filters in Activity Section). These quick filters should automatically appear next to the Detail as soon as the Page with this Detail is rendered. 

Intended Quick filter on the Detail is shown below

Dear Hatim,

Here is the example of how to add these filters to a section

https://academy.bpmonline.com/documents/technic-sdk/7-13/adding-quick-filter-block-section

You can analyse it and implement for the detail.

Best regards,

Dean

Show all comments
Discussion
studio
attachments
7.14_()
Ideas

I would like to have an option to specify that an attachment detail is read only in the properties. For example, I use multiple attachments sections for answering questions where one is reference information that should not be changed by the person answering the question and the other is for adding attachments in response to the question. This feature would significantly simplify using attachments. We have several sections that would use this functionality.

1 comments

Dear Janine,

You can set up the access permissions for the detail attachment object. The user will be able download the file, but not able to upload the edited one. Here is the example with the account attachment detail http://prntscr.com/oywufb

Once the user tries to upload the new edited file, the system will display the error message. 

Best regards,

Dean

Show all comments