Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

MPPOrderNode FinishDate

cleevers
2012-02-01
2013-03-07
  • cleevers
    cleevers
    2012-02-01

    Hello all,

    Im trying to use the Activity Control Report, but I failed…

    Can someone explain to me how FinishDate works ?
    I think that need to be the time that a Activity is completed, but in the code the time is a last movementDate.
    But I dont know why.

    Thanks

    private void setDateFinish(boolean override)
        {
            if (!DOCSTATUS_Completed.equals(getDocStatus()) && !DOCSTATUS_Closed.equals(getDocStatus()))
            {
                throw new IllegalStateException("Calling setDateFinish when the activity is not completed/closed is not allowed");
            }
            if (!override && getDateFinish() != null)
            {
                log.fine("DateFinish already set : Date="+getDateFinish()+", Override="+override);
                return;
            }
            //
            final String sql = "SELECT MAX("+MPPCostCollector.COLUMNNAME_MovementDate+")"
                        +" FROM "+MPPCostCollector.Table_Name
                        +" WHERE "+MPPCostCollector.COLUMNNAME_PP_Order_Node_ID+"=?"
                            +" AND "+MPPCostCollector.COLUMNNAME_DocStatus+" IN (?,?,?)"
                            +" AND "+MPPCostCollector.COLUMNNAME_CostCollectorType+"=?"
            ;
            Timestamp dateFinish = DB.getSQLValueTSEx(get_TrxName(), sql, get_ID(),
                                    MPPCostCollector.DOCSTATUS_InProgress,
                                    MPPCostCollector.DOCSTATUS_Completed,
                                    MPPCostCollector.DOCSTATUS_Closed,
                                    MPPCostCollector.COSTCOLLECTORTYPE_ActivityControl);
            if (dateFinish == null)
            {
                log.warning("Activity Completed/Closed but no cost collectors found!");
                return;
            }
            setDateFinish(dateFinish);
        }
    
     
  • Hi Cleevers!

    Can please give steps to replicate the issue, have you some error?

    kind regards
    Víctor Pérez
    www.e-evolution.com

     
  • cleevers
    cleevers
    2012-02-02

    So
    I'm trying to use the Activity Control window to do the follow up of production.

    During production, the items go from one sector to another to create the finished product.

    I believe the correct screen to inform the system what stage the production is, is this.

    I tried to do the following:
    - When entering the item in the sector A (1 Workflow node), I create a new record, informs the control activity and leaves the state of the document = "Prepare" ( In Progress)
    - When leaving the item from the sector, informs again (update record) but this time with the state of the document = "Completed"

    But, the system don’t take the final time that I believe is correct, its takes a start date of the last node, which is the entrance of the item.

    I'm quite confused about the use of this screen, I do not found documentation of it, and I'm doing reverse engineering of the code to know if it meets my needs.

    Thank you for your attention.

     
  • cleevers
    cleevers
    2012-02-06

    Hi Víctor!

    Any idea for the question?

    Thanks