Example #1
0
    /**

     * import process fromLibrary: downloads and imports a process from the ProcessMaker library

     *

     * @param string sessionId : The session ID (which was obtained at login).

     * @param string processId :

     * @param string version :

     * @param string importOption :

     * @param string usernameLibrary : The username to obtain access to the ProcessMaker library.

     * @param string passwordLibrary : The password to obtain access to the ProcessMaker library.

     * @return $eturns will return an object

     */



    public function getCaseNotes ($applicationID, $userUid = '')

    {

        try {

            G::LoadClass( 'case' );



            $result = new wsGetCaseNotesResponse( 0, G::loadTranslation( 'ID_SUCCESS' ), Cases::getCaseNotes( $applicationID, 'array', $userUid ) );



            $var = array ();



            foreach ($result->notes as $key => $value) {

                $var2 = array ();



                foreach ($value as $keys => $values) {

                    $field = strtolower( $keys );

                    $var2[$field] = $values;

                }



                $var[] = $var2;

            }



            $result->notes = $var;



            return $result;

        } catch (Exception $e) {

            $result = new wsResponse( 100, $e->getMessage() );



            return $result;

        }

    }
/**
 * @method
 *
 * Get of the cases notes an application.
 *
 * @name PMFGetCaseNotes
 * @label PMF Get of the cases notes an application
 * @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFGetCaseNotes.28.29
 *
 * @param string(32) | $applicationID | Application ID | ID of the Application.
 * @param string(32) | $type = "array" | type of the return value | type of the return value (array, object, string).
 * @param string(32) | $userUid = "" | User ID | Id of the User.
 * @return array, object or string | $response | Array of the response | Return an Array or Object or String.
 *
 */
function PMFGetCaseNotes($applicationID, $type = 'array', $userUid = '')
{
    G::LoadClass('case');
    $response = Cases::getCaseNotes($applicationID, $type, $userUid);
    return $response;
}