yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Quintiq file version 2.0
#parent: #root
Method Update (
  Boolean iscompleted,
  String name,
  String description,
  Boolean is_default_open,
  Boolean duedate_hasmanual,
  Date duedate,
  Date createdon,
  SWF_User createdby_user,
  SWF_AuthorizationBase assigned_authorization,
  SWF_Step parent,
  Boolean is_active_external,
  Boolean is_completion_depends_on_external,
  String primary_external_information,
  String secondary_external_information,
  String external_type,
  String updatedby,
  String viewlink,
  String viewlinkweb
)
{
  Description: 'Update my state'
  TextBody:
  [*
    this.Name( name );
    this.Description( description );
    this.IsDefaultOpen( is_default_open );
    this.DueDateHasManual( duedate_hasmanual );
    this.DueDateManual( duedate );
    this.CreatedOn( createdon );
    this.Creator( relset, createdby_user );
    this.ParentStep( relset, parent );
    this.AssignedAuthorization( relset, assigned_authorization );
    this.IsActiveExternal( is_active_external );
    this.IsCompletionDependsOnExernal( is_completion_depends_on_external );
    this.PrimaryExternalInformation( primary_external_information );
    this.SecondaryExternalInformation( secondary_external_information );
    this.ExternalType( external_type );
    this.ViewLink( viewlink );
    this.ViewLinkWeb( viewlinkweb );
    
    if( iscompleted <> this.IsCompleted() )
    {
      if( iscompleted )
      {
        this.SetCompleted( updatedby );
      }
      else
      {
        this.SetIncomplete( updatedby );  
      }
    }
    
    if( not isnull( parent ) )
    {
      parent.SetCompletenessImplicitWhenNeeded();
    }
  *]
}