<h1>Approval</h1>
<p>A drafted contract can be circulated for review. The contract goes through an approval process, which ends with its <span
style='font-weight:bold;font-style:italic'>approval</span> or <span
style='font-weight:bold;font-style:italic'>rejection</span>.</p>
<p>{@img img1.png}</p>
<p>Contract approval can be initiated during any phase. This allows for approval scenarios before and after <a
href="#!/guide/pFA843D33_178F_4995_9EF9_6807252DC76E">contract negotiation</a>. During contract approval, all involved parties can make corrections to the contract documents or the contract.</p>
<p>During approval, the contract is assigned the status &quot;Approval initiated.&quot; Approved contracts are assigned the status &quot;Approved,&quot; while rejected contracts are given the status &quot;Draft.&quot;</p>
<blockquote>
<p><span
style='font-style:italic'>A contract manager creates a draft of a framework contract and submits it to the approval process. The legal department, accounting, and company management were identified as check steps in the configuration. After the approval process is completed, or if a user rejects approval, the contract manager receives a notification as a task.</span></p>
</blockquote>
<p>{@img img3.png}</p>
<h2>Check steps</h2>
<p>Steps during contract approval are referred to as check steps. Essentially, check steps are defined by all users and groups involved in the process. The list of check steps can be edited at runtime. This allows users to add steps, or remove steps that are no longer necessary, for example.</p>
<p>You can control whether subsequent users can edit steps by enabling or disabling the &quot;mandatory&quot; option.</p>
<p>{@img img5.png}</p>
<p>Lists are processed top-down in a cycle. If the workflow is submitted to a user for approval, the user (first in the list) is removed from the list. As a result, the steps are processed.</p>
<p>The check steps for contract approval can be controlled via the role configuration. This can be found in the contract management configuration, in the <span
style='font-weight:bold;font-style:italic'>Dynamic user roles</span> setting. The role for contract approval is <span
style='font-weight:bold;font-style:italic'>APPROVAL</span>.</p>
<p>{@img img7.png}</p>
<h2>Extending permissions in the approval process</h2>
<p>Depending on the configuration in the workflow, involved users are given permissions allowing them to view or edit these contracts. Further information on extending permissions can be found in the chapter on <a
href="#!/guide/p89F88CAF_C876_4A5C_8F86_B7348320FF1C">permissions</a>.</p>
<h2>Action: Initiate approval</h2>
<p>This action can be accessed on the <code>Contracts</code> tab in the ribbon. </p>
<p>{@img img9.png}</p>
<h3>Requirements</h3>
<ul>
<li>A contract is selected.</li>
</ul>
<h3>Data input: Initiate approval</h3>
<p>The <code>003_1_initiate_approval</code> form tab group is used for data input. </p>
<p>{@img img11.png}</p>
<p>This consists of the following components:</p>
<table><thead><tr><td><span
style='font-weight:bold'>Approval</span></td></tr></thead><tbody><tr><td>610_initiate_approval</td></tr><tr><td>100_users</td></tr></tbody></table>

<h3>Data input: Contract data verification</h3>
<p>The <code>003_2_approve_contract</code> form tab group is used for data input. </p>
<p>{@img img13.png}</p>
<p>This consists of the following components:</p>
<table><thead><tr><td><span
style='font-weight:bold'>Approval</span></td><td><span
style='font-weight:bold'>Contract data</span></td><td><span
style='font-weight:bold'>Duration</span></td><td><span
style='font-weight:bold'>Contract partner</span></td><td><span
style='font-weight:bold'>Cash flow</span></td></tr></thead><tbody><tr><td>611_contract_approval</td><td>210_general</td><td>310_duration</td><td>510_partner</td><td>410_payment</td></tr><tr><td>100_users</td><td>220_company</td><td></td><td>520_partner_address</td><td></td></tr><tr><td></td><td>230_contract_data</td><td></td><td></td><td></td></tr><tr><td></td><td>240_accounting</td><td></td><td></td><td></td></tr><tr><td></td><td>250_project</td><td></td><td></td><td></td></tr></tbody></table>

<h3>Data input: Conclusion of the approval process</h3>
<p>The <code>003_3_finish_approval</code> form tab group is used for data input. </p>
<p>{@img img15.png}</p>
<p>This consists of the following components:</p>
<table><thead><tr><td><span
style='font-weight:bold'>Approval</span></td><td><span
style='font-weight:bold'>Contract data</span></td><td><span
style='font-weight:bold'>Duration</span></td><td><span
style='font-weight:bold'>Contract partner</span></td><td><span
style='font-weight:bold'>Cash flow</span></td></tr></thead><tbody><tr><td>612_finish_approval</td><td>210_general</td><td>310_duration</td><td>510_partner</td><td>410_payment</td></tr><tr><td></td><td>220_company</td><td></td><td>520_partner_address</td><td></td></tr><tr><td></td><td>230_contract_data</td><td></td><td></td><td></td></tr><tr><td></td><td>240_accounting</td><td></td><td></td><td></td></tr><tr><td></td><td>250_project</td><td></td><td></td><td></td></tr></tbody></table>

<h3>Implementation</h3>
<p><span class="tag_warning"><span
style='font-weight:bold'>Action definitions:</span> Definitions of the actions for the clients are located in the <code>sol.contract.InitiateApproval</code> configuration.</span></p>
<p>The <span
style='font-weight:bold'>technical workflow</span> is implemented by Indexserver action <code>sol.contract.ix.actions.ApproveContract</code>. This action starts the <code>sol.contract.contract.approval</code> workflow.</p>
<p>If successful, the following events are transferred to the client:</p>
<table><thead><tr><td>Event</td><td>Description</td><td>Status</td></tr></thead><tbody><tr><td>DIALOG</td><td>Shows the form to input data in a dialog box.</td><td></td></tr><tr><td>REFRESH</td><td>Refreshes the display of the SORD object.</td><td></td></tr></tbody></table>

<p><span
style='font-weight:bold'>Description of the workflow</span></p>
<p>{@img img17.png}</p>
<table><thead><tr><td><span
style='font-weight:bold'>Node name</span></td><td><span
style='font-weight:bold'>Node description</span></td><td><span
style='font-weight:bold'>Function</span></td></tr></thead><tbody><tr><td><span
style='font-weight:bold'>USERROLESTOMAP</span></td><td><span
style='font-weight:bold'>USERROLESTOMAP</span><br />Distribution node: Saves the user roles defined for the approval process in a map table</td><td>sol.common.ix.functions.UserRolesToMap</td></tr><tr><td><span
style='font-weight:bold'>Set approver</span></td><td><span
style='font-weight:bold'></span><br />User node: Select one or more approvers for approval</td><td></td></tr><tr><td><span
style='font-weight:bold'>CHANGECOLOR: Approval initiated</span></td><td><span
style='font-weight:bold'></span><br />Distribution node: Sets the color of the SORD object</td><td>sol.common.ix.functions.ChangeColor</td></tr><tr><td><span
style='font-weight:bold'>Dynamic flow has approval steps?</span></td><td><span
style='font-weight:bold'>Check ad-hoc flow start</span><br />Decision node: Checks the ELO_WF_STATUS field for the value 'CYCLE_START' to start an approval cycle in this case</td><td>sol.common.ix.functions.CheckDynAdHocFlowStart</td></tr><tr><td><span
style='font-weight:bold'>STATUS: Approved</span></td><td><span
style='font-weight:bold'></span><br />Distribution node: Sets the CONTRACT_STATUS index field to 'A'</td><td>sol.common.ix.functions.Status</td></tr><tr><td><span
style='font-weight:bold'>FEED: Immediate approval</span></td><td><span
style='font-weight:bold'></span><br />Distribution node: Creates a feed post indicating approval without further review</td><td>sol.common.ix.functions.FeedComment</td></tr><tr><td><span
style='font-weight:bold'>STATUS: Approval</span></td><td><span
style='font-weight:bold'></span><br />Distribution node: Sets the CONTRACT_STATUS index field to 'I'</td><td>sol.common.ix.functions.Status</td></tr><tr><td><span
style='font-weight:bold'>FEED: Approval initiated</span></td><td><span
style='font-weight:bold'></span><br />Distribution node: Creates a feed post indicating approval has been initiated</td><td>sol.common.ix.functions.FeedComment</td></tr><tr><td><span
style='font-weight:bold'>CHANGEUSER: Approval</span></td><td><span
style='font-weight:bold'></span><br />Distribution node: Changes the owner of the next user node</td><td>sol.common.ix.functions.ChangeUser</td></tr><tr><td><span
style='font-weight:bold'>Approval</span></td><td><span
style='font-weight:bold'></span><br />User node: Approval by defined approver</td><td></td></tr><tr><td><span
style='font-weight:bold'>FEED: Approval accepted</span></td><td><span
style='font-weight:bold'></span><br />Distribution node: Creates a feed post indicating approval has been granted</td><td>sol.common.ix.functions.FeedComment</td></tr><tr><td><span
style='font-weight:bold'>FEED: Approval rejected</span></td><td><span
style='font-weight:bold'></span><br />Distribution node: Creates a feed post indicating approval has been rejected</td><td>sol.common.ix.functions.FeedComment</td></tr><tr><td><span
style='font-weight:bold'>Check rejected</span></td><td><span
style='font-weight:bold'></span><br />Decision node: Checks the ELO_WF_STATUS field for the value 'REJECTED' to conclude the approval process accordingly</td><td></td></tr><tr><td><span
style='font-weight:bold'>Contract approved</span></td><td><span
style='font-weight:bold'></span><br />User node: Acknowledgement</td><td></td></tr><tr><td><span
style='font-weight:bold'>FEED: Approval completed</span></td><td><span
style='font-weight:bold'></span><br />Distribution node: Creates a feed post indicating the approval process has been completed</td><td>sol.common.ix.functions.FeedComment</td></tr><tr><td><span
style='font-weight:bold'>STATUS: Draft</span></td><td><span
style='font-weight:bold'></span><br />Distribution node: Sets the CONTRACT_STATUS index field to 'D'</td><td>sol.common.ix.functions.Status</td></tr><tr><td><span
style='font-weight:bold'>Contract rejected</span></td><td><span
style='font-weight:bold'></span><br />User node: Acknowledgement</td><td></td></tr><tr><td><span
style='font-weight:bold'>FEED: Approval declined</span></td><td><span
style='font-weight:bold'></span><br />Distribution node: Creates a feed post indicating approval has been declined</td><td>sol.common.ix.functions.FeedComment</td></tr><tr><td><span
style='font-weight:bold'>SET: Delete comment</span></td><td><span
style='font-weight:bold'>SET</span><br />Removes the previous comment from the WF_MAP</td><td>sol.common.ix.function.Set</td></tr></tbody></table>
